problem 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. prepare the main () function which declares HouseThatIsAnInvestment and displays its values.
Compute the profit and percent profit for the investment inside its constructor.