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
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?
Step by Step Solution
3.34 Rating (166 Votes )
There are 3 Steps involved in it
Instance variables are declared in a class but outside a method constructor or any block When space ... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
2106_61d6ac3466d10_873056.pdf
180 KBs PDF File
2106_61d6ac3466d10_873056.docx
120 KBs Word File
