The perimeter method is implemented in the superclass as it does not change based on the number of sides.
The area method must be overridden in each subclass as the area is dependent on the type of polygon.
The areas of an equilateral triangle, square, and a regular hexagon given side length a are v 3 4 a 2 , a 2 , and 3 v 3 2 a 2 , respectively.
The superclass area method should just return 0 as a default value.