Question: Overload the binary operators +, - and == so that they will accept arguments of the a class Money which has two functions, input and

Overload the binary operators +, - and == so that they will accept arguments of the a class Money which has two functions, input and output to input the amount of money to compare and output the result of the comparison. Overload also the unary operator - when it is used to mean negation (e.g., when it is used to set the value of a variable x equal to the negative of the value of the variable y, x =-y).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!