cashRegisiter class simulates the sale of a product. Cashregisiter has an array that can hold retailItem objects, a constant for VAT rate and a variable to store total sales
(1) default constructor to initializes the class data retailItem with a max of 10 objects
(2)class getSubtotal that returns the sum of the quanity multiply by the retail price for the retailItem stored
this the first part of the program
the accessor methods for getting the values of retailitem have been done
which is class in a class
I read that as, "This is the first part of the program. The accesor methods for getting the values of retalitem have already been done. (I can't understand the last sentence.)"
cashRegisiter class simulates the sale of a product. Cashregisiter has an array that can hold retailItem objects, a constant for VAT rate and a variable to store total sales
question how do you get:
(1) default constructor to initializes the class data with appropriate values. the array of the class retailItem will hold a max of 10 objects
question how do you go about:
(2)class getSubtotal that returns the sum of the quanity multiply by the retail price for all the retailItem stored in the class.
I'm not sure I completely understand the calculations you need to do. What is the "VAT rate?" What do you mean by "returns the sum of the quanity multiply by the retail price for all the retailItem?" Did you mean method getSubtotal, instead of class getSubtotal, because verbs are usually methods, where as classes are usually nouns.