Question: Hello I would like to know how to code class Polygon based on the below in Java. And also for the main function, Implement the

Hello I would like to know how to code class Polygon based on the below in Java.

Hello I would like to know how to code class Polygon based

And also for the main function,

Implement the story that.

1.Person A purchased a rectangular cake whose width is 8 and height is 4

2.Person B ate half of the cake and converted the shape of the cake into a right triangle

3.Person B wants to find out the area and perimeter of the triangle.

Thank you

Please create a class to model Polygon o Data members int numSides (number of sides) Vector widths (the widths of sides) o Methods Manager functions o Constructor Access functions o get o set o Predicate isSquare .isCircle isTriangle Implementor functions o perimeter o areaOfRightTriangle

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 Databases Questions!