Suppose the CashRegister needs to support a method void undo() that undoes the addition of the preceding

Question:

Suppose the CashRegister needs to support a method void undo() that undoes the addition of the preceding item. This enables a cashier to quickly undo a mistake. What instance variables should you add to the CashRegister class to support this modification?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: