Using Java write a progam that display the following results: PRoblem and smaple run is attached. I have my code written but keep getting error issues and want to see what im doing wrong. Enter the...


Using Java write a progam that display the following results:



PRoblem and smaple run is attached. I have my code written but keep getting error issues and want to see what im doing wrong.


Enter the number of sides: 5<br>J Enter<br>Enter the side: 6.5<br>- Enter<br>The area of the polygon is 72.69017017488385<br>

Extracted text: Enter the number of sides: 5 J Enter Enter the side: 6.5 - Enter The area of the polygon is 72.69017017488385
(Geometry: area of a regular polygon) A regular polygon is an n-sided polygon<br>in which all sides are of the same length and all angles have the same degree (i.e.,<br>the polygon is both equilateral and equiangular). The formula for computing the<br>area of a regular polygon is<br>n X s²<br>Area<br>TT<br>4 X tan<br>n<br>Write a method that returns the area of a regular polygon using the following header:<br>public static double area(int n, double side)<br>Write a main method that prompts the user to enter the number of sides and the<br>side of a regular polygon and displays its area. Here is a sample run:<br>

Extracted text: (Geometry: area of a regular polygon) A regular polygon is an n-sided polygon in which all sides are of the same length and all angles have the same degree (i.e., the polygon is both equilateral and equiangular). The formula for computing the area of a regular polygon is n X s² Area TT 4 X tan n Write a method that returns the area of a regular polygon using the following header: public static double area(int n, double side) Write a main method that prompts the user to enter the number of sides and the side of a regular polygon and displays its area. Here is a sample run:

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here