Question: estion Write a Java program that displays polygon information and their area and perimeter. A polygon is described by a number of line segments connected

estion Write a Java program that displays polygon information and their area and perimeter. A polygon is described by a number of line segments connected to form a figure. A polygon has a number of line segments and the length of the segment. Pentagon is a polygon with 5 line segments while a Hexagon is a polygon with 6 segments. The perimeter of any regular polygon is the number of segments times the length of the segment. While the area depends on the type of the polygon. The area of a pentagon is 1V5(5+2/5) a?, where a is the length of the line segment, while the area of a hexagon is 313 a? 2. a a pentagon hexagon Polygon Pentagon Hexagon According to this description and the concepts of OOP, do the following
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
