java-write a program using overloading concept create a class to find out and show the area and perimeter of shape chose by the user. The user must be provided with a menu to chose her.his option. she/he should be asked to input the corresponding and necessary information. The menu must repeaditly be shown to the user till he decided to exit the progra
in java-write a
![](/static/compass_v2/shared-icons/check-mark.png)
Program Approach:
1- The concept of method overloading means the same method name and different types of arguments.
2- As mentioned in the assignment create the menu program, it will repeat again n again till the user will not enter the exit number.
3- With the help of the do-while loop used to create the menu program.
4- Created method name as calculate() with different arguments. That is part of method overloading.
5- The scanner class is used to take input from a user.
6- Prompt a message to take the area or perimeter input from a user.
7- Mentioned method return the type as void with the static keyword.
8- For static keywords don't need to create the object of a class to call the method.
9- Static keyword belongs to the class area, the user can call directly.
10- Please check the following complete example and output screenshot.
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)