Computing profit in constructor-creating investment class


Question 1) Create the Investment class which contains fields to hold initial value of the investment, the current value, the profit (computed as a difference between present value and initial value), and percent profit (the profit divided by the initial value). Include the constructor which requires initial and present values and display function. Create the House class which includes fields for street address and square feet, a constructor which requires values for both fields, and display function. Creat HouseThatIsAnInvestment class which inherits from Investment and House. It includes the constructor and the display function which calls display functions of parents. Write the main () function which declares HouseThatIsAnInvestment and displays its values.

Compute the profit and percent profit for the investment inside its constructor.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Computing profit in constructor-creating investment class
Reference No:- TGS04671

Expected delivery within 24 Hours