Professional Documents
Culture Documents
Assignment 4
Assignment 4
ANSWER
Create a base class Shape with a pure virtual method area() that
returns the area of the shape. Derive three classes from Shape: Circle,
QUESTION # 02 Rectangle, and Triangle. Each derived class should implement the
area() method specific to the shape it represents. Additionally, create a
method to print the details of each shape.
Answer
Answer