It is required to develop an application in Java to perform some operations to store information about items in a store. The application will have the following classes: (A) An abstract class called...


It is required to develop an application in Java to perform some operations to store<br>information about items in a store. The application will have the following classes:<br>(A) An abstract class called item having foliowing data fieids (private):<br>itemName (String), itemNumlingi, makeStringl, pricejdouble) and following<br>methods:<br>() Default constructor - without any parameters,<br>(i) Constructor having 4 parameters to initialize ali data fields,<br>(i) Set and get methods for all data fields separately.<br>(iM) tostring method to retum string representation of all data members,<br>(M Abstract method totalPrice to return total price.<br>(8) Write a concrete class (with implementation of all methods) called Storeltem,<br>which inherits the properties of class item. This new class has the following<br>additional members<br>Data fields (privatel quantity (int), disceuntRateldouble). Note that discountRate is<br>% of the sale price.<br>Methods. (public):<br>Default constructor- without any parameters<br>(i Constructor with 6 parameters.<br>(i set and get methads for both data fields separately.<br>(ivl totalPrice returns price multiplied by (10 - discountRate/100) further<br>multiplied by quantity.<br>(v testring retums String equivalent of all attributes (including that of Item).<br>(vi Print outputs all attributes (including that of Item) and also outputs the total<br>price.<br>(C) Write a class called Store having anly main method to test all functionalities of<br>class Storeltem<br>

Extracted text: It is required to develop an application in Java to perform some operations to store information about items in a store. The application will have the following classes: (A) An abstract class called item having foliowing data fieids (private): itemName (String), itemNumlingi, makeStringl, pricejdouble) and following methods: () Default constructor - without any parameters, (i) Constructor having 4 parameters to initialize ali data fields, (i) Set and get methods for all data fields separately. (iM) tostring method to retum string representation of all data members, (M Abstract method totalPrice to return total price. (8) Write a concrete class (with implementation of all methods) called Storeltem, which inherits the properties of class item. This new class has the following additional members Data fields (privatel quantity (int), disceuntRateldouble). Note that discountRate is % of the sale price. Methods. (public): Default constructor- without any parameters (i Constructor with 6 parameters. (i set and get methads for both data fields separately. (ivl totalPrice returns price multiplied by (10 - discountRate/100) further multiplied by quantity. (v testring retums String equivalent of all attributes (including that of Item). (vi Print outputs all attributes (including that of Item) and also outputs the total price. (C) Write a class called Store having anly main method to test all functionalities of class Storeltem

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here