Programming Project 9.22.7: •••. 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.

Report
Question

Please briefly explain why you feel this question should be reported.

Report
Cancel
Programming Project 9.22.7: •••.

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.

MathJax Example

Answer ( 1 )

  1. Please briefly explain why you feel this answer should be reported.

    Report
    Cancel

Leave an answer

Browse

By answering, you agree to the Terms of Service and Privacy Policy.