Question: Write a C++ class named CashRegister. The class should have private data members named Hundreds, Tens, Fives, and Singles all of type integer. The class
Write a C++ class named CashRegister. The class should have private data members named Hundreds, Tens, Fives, and Singles all of type integer. The class should have the following: 1. A member function named GetTotalCash to retrieve the total cash inside the cash register. 2. Overload the + operator to allow adding two objects of type CashRegister (note, add the hundreds to the hundreds, tens to tens and so on). 3. Overload the > operator to compare between two CashRegisters objects based on their totalcash. 4. Overload the += operator.
Thank you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
