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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started