Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C++ Object-Oriented Programming - Create a class called Money with all of these requirements met. Money Class Requirements Negative amounts of Money shall be stored
C++ Object-Oriented Programming - Create a class called Money with all of these requirements met.
Money Class Requirements Negative amounts of Money shall be stored by making both the dollars and cents negative The Money class shall have 4 constructors * A default constructor that initializes your Money object to $0.00 *A constructor that takes two integers, the first for the dollars and the second for the cents *A constructor that takes one integer, for an clean dollar amount A constructor that takes one double, and can assign dollars and cents accordingly - int getPennies const e Returns the equivalent amount of money as a number of pennies - bool isNegative ) const Returns true if your amount of money is negative - void add (const Money &m) * The sum shall be stored in the calling object -void subtract (const Money &m) *The difference shall be stored in the calling object bool isEqual (const Money &m) - void print) const * This function prints the amount of Money you have, it must print a .$,' and always show two decimal places *Negative amounts of Money shall be represented in the following manner: (SX.XX) The Money class shall have two private data membersStep 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