Question: Using C++ Define a class named Money that stores a monetary amount. The class should have two private integer variables, one to store the number
Using C++
Define a class named Money that stores a monetary amount. The class should have two private integer variables, one to store the number of dollars and another to store the number of cents. Create a default constructor that sets the monetary amount to 0 dollars and 0 cents, and create a second constructor with input parameters for the amount of the dollars and cents variables. Add accessor and mutator functions to read and set both member variables. Add another function that returns the monetary amount as a double. Write a program that tests all of your functions with at least two different Money objects.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
