Professional Documents
Culture Documents
Questions
◦ Does it make sense to create an object of the Shape class?
◦ Should we, and how can we, prohibit this?
HINT: pure virtual method / abstract class
Create an array of 4 Shapes and use it to
store 2 Triangles and 2 Rectangles
Write a program that computes the total area
of shapes in the array
◦ Are there any issues with this?
◦ If we add a member variable to store the angle
between two sides of triangle does the program
break? Why?