Question: Implement the following UML diagram as a Java class. (HINT: This will involve use of Javas Math class. To learn more about convex regular polygons,
Implement the following UML diagram as a Java class. (HINT: This will involve use of Javas Math class. To learn more about convex regular polygons, see this link. The formulas you will need to solve this problem are on that page, as well as a table of data you can use to test your program.)
ConvexRegularPolygon UML class diagram
Once you have implemented and tested that class, use it to compute the area of a convex regular polygon with 8 sides, each of length 16.6.
\begin{tabular}{|l|} \hline \multicolumn{1}{|c|}{ ConvexRegularPolygon } \\ \hline - int sides \\ - double sideLength \\ \hline + RegularPolygon(int sides, double sideLength \\ + int getSides() \\ + double getSideLength() \\ + double computeArea() \\ \hline \end{tabular}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
