Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Note: calculate the profit and percent profit for the investment inside its constructor. an Investment class that contains fields to hold the initial value of
Note: calculate the profit and percent profit for the investment inside its constructor.
an Investment class that contains fields to hold the initial value of an investment, he current value, the profit (calculated as the difference between current value and al value), and the percent profit (the profit divided by the initial value). Include a constructor that requires initial and current values and a display function. Create a House dass that includes fields for street address and square feet, a constructor that requires values for both fields, and a display function. Create a HouseThatIsAnInvestment class that inherits from Investment and House. It includes a constructor and a display function that calls the display functions of the parents. Write a main () function that declares a HouseThatIsAnInvestment and displays its values. Save the file as HouseThatIsAnInvestment.cppStep 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