Question: Reimplement the CashRegister class so that it keeps track of the price of each added item in an ArrayList. Remove the itemCount and totalPrice instance
Reimplement the CashRegister class so that it keeps track of the price of each added item in an ArrayList. Remove the itemCount and totalPrice instance variables. Reimplement the clear, addItem, getTotal, and getCount methods. Add a method displayAll that displays the prices of all items in the current sale.
Step by Step Solution
3.44 Rating (163 Votes )
There are 3 Steps involved in it
public class CashRegister private ArrayList prices constructor public CashRe... View full answer
Get step-by-step solutions from verified subject matter experts
