Question: Code in C++ ! The output should like this. Create IVIoney class. class Money { public: Money(); Money(int dollars, int cents); void setDollars(int); void setCents(int);
The output should like this. Create IVIoney class. class Money \{ public: Money(); Money(int dollars, int cents); void setDollars(int); void setCents(int); int getDollars(); int getCents(); friend Money add(Money amount1, Money amount 2); I friend bool equal(Money amount1, Money amount 2); double get_value(); // if 12 dollars and 40 cents, this return $12.40 private: int dollars; int cents; Enter the amount of your money: 10023 Enter the amount of my money: 10023 Your amount is $100.23. My amount is $100.23. We have the same amounts. Enter the amount of your money: 12580 Enter the amount of my money: 13055 Your amount is $125.80. My amount is $130.55. One of us is richer
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
