Question: side, and centered at ( O , 0 ). A constructor that creates a regular polygon with the specied number of sides, length of side,

 side, and centered at ( O , 0 ). A constructor

side, and centered at ( O , 0 ). A constructor that creates a regular polygon with the specied number of sides, length of side, and x and ycoordinates. The constant accessor functions and mutator functions for all data fields. The constant function get Perimeter ( } that returns the perimeter of the polygon. The constant function getArea D that returns the area of the polygon. The formula for computing the area of a regular polygon is. nxs2 4xtan(:)- n Area 2 Draw the UML diagram for the class. Implement the class. Write a test program that creates three RegularPolygon objects, using the noarg constructor, using RegularPolygon (6, 4) , and using RegularPolygon (10 , 4, 5 . 6, 7 . 8) . For each object, display its perimeter and area

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!