Exercises
Write three classes :
- Rectangle,
- Circle,
- Triangle,
inheriting from an abstract class aShape. Add methods to calculate the surface of those shapes.
Use the Shape hierarchy to instantiate five shapes and put them into an array. Then calculate the average surface area of those five shapes.
Find how to use the Random class to generate random values to initialise the shape objects.