Problem

Consider the classes class cashRegister and dispenserType given in the Programming Examp...

Consider the classes class cashRegister and dispenserType given in the Programming Example ‘‘Juice Machine’’ in Chapter 10.

a. In the class class cashRegister, add the functions to overload the binary operators + and – to add and subtract an amount in a cash register; the relational operators to compare the amount in two cash registers; and the stream insertion operator for easy output.

b. The class dispenserType, in the Programming Example ‘‘Juice Machine’’ in Chapter 10, is designed to implement a dispenser to hold and release products. In this class, add the functions to overload the increment and decrement operators to increment and decrement the number of items by one, respectively, and the stream insertion operator for easy output.

c. Write a program to test the classes designed in parts a and b.

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT