Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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);
Code in C++ !
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 The output should like this.
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