subject

Define a Polygon interface that has methods area( ) and perimeter( ). Then implement classes for Triangle, Quadrilateral, Pentagon, Hexagon, and Octagon, which implement this interface, with the obvious meanings for the area( ) and perimeter( ) methods. Also implement classes, IsoscelesTriangle, EquilateralTriangle, Rectangle, and Square, which have the appropriate inheritance relationships. Finally, 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. For extra effort, allow users to input polygons by specifying their vertex coordinates and be able to test if two such polygons are similar.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 21:20
Your program will make use of long long int variables for all calculations. note: the use of long long int requires that you have c++11 support. you should have this automatically if you are using a newer version of visual studio. the support is there for gcc as well, but you may need the -std=c++11 or -std=c++0x compiler flag. you first need to read in the total number of seconds. there is no prompt for the read (that is, you just do the cin without using a cout to display a prompt). this is going to seem a little strange when you are running your program in your ide
Answers: 2
question
Computers and Technology, 23.06.2019 00:30
Pl i need the answer now ! which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 1
question
Computers and Technology, 24.06.2019 10:50
In 2009 to 2010, how many social network users were reported as being victims of online abuse? a. 1 in 10 b. 100% c.1 in 100 d. 50%
Answers: 2
question
Computers and Technology, 24.06.2019 11:00
Under the home tab, where can a user find options to change the bullet style of an outline? in the slides group in the font group in the paragraph group in the drawing group
Answers: 1
You know the right answer?
Define a Polygon interface that has methods area( ) and perimeter( ). Then implement classes for Tri...
Questions
Questions on the website: 13722359