Geometric Shapes
Description
There are different geometric shapes. All geometric shapes have a perimeter and an area. Some geometric shapes need the constant pi to calculate these values.
Tasks
- Implement an abstract class
GeometricShape
that defines the abstract functions to get the perimeter and the area and a static for pi. - Implement the classes
Square
,Circle
andRectangle
that extend the classGeometricShape
. - Implement constructors that contain the parameters needed to calculate the functions (like radius, length of sides…).
- Implement the functions for the different shapes.
- Write a “Main”-class
ShapeTester
that tests your implementation