a:) Define a Polygon interface that has methods area() and perimeter(). b:) Then implement classes for Triangle, Quadrilateral, Pentagon, Hexagon, and Octagon, which implement this interface, with the obvious meanings for the area() and perimeter() methods. c:) Implement classes, IsoscelesTriangle, Equilateral-Triangle, Rectangle, and Square, which have the appropriate inheritance relationships. d:) Write a simple user interface, which allows users to create polygons of the various types, input their geometric dimensions, and then output their area and perimeter. e:) For extra effort, allow users to input polygons by specifying their vertex coordinates and be able to test if two such polygons are similar. using all a to e parts develop a program
a:) Define a Polygon interface that has methods area() and perimeter().
b:) Then implement classes for Triangle, Quadrilateral, Pentagon, Hexagon, and Octagon, which implement this interface, with the obvious meanings for the area() and perimeter() methods.
c:) Implement classes, IsoscelesTriangle, Equilateral-Triangle, Rectangle, and Square, which have the appropriate inheritance relationships.
d:) Write a simple user interface, which allows users to create polygons of the various types, input their geometric dimensions, and then output their area and perimeter.
e:) For extra effort, allow users to input polygons by specifying their vertex coordinates and be able to test if two such polygons are similar.
using all a to e parts develop a program
Trending now
This is a popular solution!
Step by step
Solved in 5 steps with 1 images