Question: KINDLY ANSWER IT IN C++ . IT IS OOP Dollar The US dollar is composed of many different coins, which include nickels, cents, and quarters,

Dollar The US dollar is composed of many different coins, which include

KINDLY ANSWER IT IN C++ . IT IS OOP

Dollar The US dollar is composed of many different coins, which include nickels, cents, and quarters, which can be combined to make up any amount of money. In this question, you are required to create a Money Class in which a specific amount of money will be represented in terms of dollars, quarters, nickels, and cents in that precedence. This money class will consist further of the dollar, quarter, nickel, and cent classes. For example, if your amount of money is 4.56, your class will first store the maximum possible amount in dollars, then it will move on to quarters, nickels, and cents. You are required to implement the following functions: class Money { // think about the private data members public: Monex(); // default constructor Money (int); // parameterized constructor //Implement getters and setter functions Money operator+(Money m); // Money operator-(Money m); // Money operator+(Dollar d): // Money operator-(Dollar d); // Money operator+(Nickel d): // Money operator-(Nickel d); // Money operator+(Quarter d): // Money operator-(Quarter d); // Money operator+(Cent d): // Money operator (Cent d); // //These are all addition and subtraction on overloads to add specific coins to the total amount of money Money operator ++) //Round up the current amount of money to the nearest quarter Money operator --() //Round down the current amount of money to the nearest quarter Bool operator>=0) Bool operator

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 Programming Questions!