Define a Polygon interface that has methods area( ) and perimeter( ) . Then impl
ID: 662285 • Letter: D
Question
Define a Polygon interface that has methods area( ) and perimeter( ). Then implement classes for Triangle, Quadrilateral, Pentagon, and Hexagon, which implement this interface, with the obvious meanings for the area( ) and perimeter( ) methods. Also implement classes, IsoscelesTriangle, and Rectangle, which have the appropriate inheritance relationships. Finally, write a simple user interface (main class), which allows users to create polygons of the various types, input their geometric dimensions, and then output their area and perimeter.
For extra effort, allow users to input polygons by specifying their vertex coordinates and be able to test if two such polygons are similar.
I specifically need help with the tester class and the vertex coordinates class.
Explanation / Answer
Here is my Quad class
Here is the Polygon Class
Here is the Tester Class
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.