(Solved):Shapes I have provided a PolyShape class that represents polygons by their number of sides and an array that contains their side lengths. You will write child classes and a driver program to use Po… View Answer…

 

Question

Shapes I have provided a PolyShape class that represents polygons by their number of sides and an array that contains their side lengths. You will write child classes and a driver program to use PolyShape.

https://gyazo.com/61da7321b79281568df1e6ffbe819f2f

Do not modify the PolyShape class.

Write four classes that extend PolyShape.

Quadrilateral This class represents polygons with four sides

Rectangle The class represents four-sided polygons where opposite sides are equal length. This class should have a method getArea()

Scroll to top