![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 25.11.2020 18:40 zyairemitchell44
Write code which takes inputs from the user for the number of sides (int) and side length (double), then creates a regular polygon with these characteristics. The program should then print a sentence with the name of the shape and the area and perimeter as shown in the sample run. You should use the appropriate RegularPolygon methods to obtain the perimeter and area of the shape rather than attempting to calculate these values yourself.
Sample run:
Enter number of sides:
> 5
Enter side length:
> 3.5
A regular pentagon with side length 3.5 has perimeter 17.5 and area 21.075848157214846
Hint: You can approach this problem by saving the int and double as variables, and then creating the RegularPolygon, or you can create the polygon and use methods to set the values of the sides and sidelength.
PROGRAMING LANGUAGE: java
PLEASE HELP
![ansver](/tpl/images/cats/User.png)
Answers: 1
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Other questions on the subject: Computers and Technology
![image](/tpl/images/cats/informatica.png)
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 22.06.2019 17:00, bnvghnbbb
Match the following. 1. show grouping of word processing tasks that can be performed quick access toolbar 2. shortcut location for commonly used elements scroll bars 3. organized commands used to modify documents ribbon 4. used to align and measure content in a word screen zoom bar 5. vertical and horizontal bars that are used to navigate through a document contextual tabs 6. displays the name of the document in use ruler 7. allows users to enlarge or shrink a visual of a word document title bar
Answers: 2
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 10:00, uwunuzzles
How do i delete my account on this because i didn't read this agreements and also i put age at xd
Answers: 1
![image](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 19:30, 123iamthe1
You can apply several different worksheet themes from which tab?
Answers: 1
You know the right answer?
Write code which takes inputs from the user for the number of sides (int) and side length (double),...
Questions in other subjects:
![Konu](/tpl/images/cats/mat.png)
Mathematics, 03.01.2021 05:10
![Konu](/tpl/images/cats/himiya.png)
Chemistry, 03.01.2021 05:10
![Konu](/tpl/images/cats/mat.png)
Mathematics, 03.01.2021 05:10
![Konu](/tpl/images/cats/es.png)
![Konu](/tpl/images/cats/biologiya.png)
![Konu](/tpl/images/cats/ap.png)
Advanced Placement (AP), 03.01.2021 05:10
![Konu](/tpl/images/cats/istoriya.png)
![Konu](/tpl/images/cats/mat.png)
Mathematics, 03.01.2021 05:10
![Konu](/tpl/images/cats/fizika.png)
Physics, 03.01.2021 05:10