Question: C++ Please! Exercise 2: Cash Register (This is essentially Exercise P9.7 of the book) Write a program cashregister.cpp that reimplements the CashRegister class, so that
C++ Please!

Exercise 2: Cash Register (This is essentially Exercise P9.7 of the book) Write a program cashregister.cpp that reimplements 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. Please have the output formatted exactly like the following examples: (the red is user input) Enter item prices (Q when done): 17.29 1.35 22.60 Q Total items : 3 Total price in cents: 4124 Note: Assume the user inputs at least 1 item price. Note on formatting: We'll stress again - please have the formatting like the above examples. Make sure to have colons. No invalid inputs: You do NOT have to worry about the user giving invalid inputs like characters (except for Q), really large numbers, etc. . You may not use stdafx.h
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
