Reimplement the CashRegister class so that it keeps track of the total price as an integer: The

Question:

Reimplement the CashRegister class so that it keeps track of the total price as an integer:

The total cents of the price. For example, instead of storing 17.29, store the integer 1729. Such an implementation is commonly used because it avoids the accumulation of roundoff errors. Do not change the public interface of the class.

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

Step by Step Answer:

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