Question: C++ Assignment 4 1. In the main, define two variables a triangle and a rectangle and then call the area0 function in this two variables.
Assignment 4 1. In the main, define two variables a triangle and a rectangle and then call the area0 function in this two variables. write a program that defines a shape class with a constructor that gives value to width and height. Then define two sub-classes triangle and rectangle, that calculate the area of the shape area () 2. In the main define a daughter and call the display0 method on it. Write a program with a mother class and an inherited daughter class. Both of them should have a method void display () that prints a message (different for mother and daughter 0 3. Create two bases variables Zebra and Dolphin which write a message telling the age, the name and giving some extra information. Write a program with a mother class animal. Inside it define a name and an age variables, and set value) function. Then (e.g. place of origin)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
