Question: Question 01: Write a menu driven Java program that displays the following menu: 1. Calculate circle area. 2. Calculate sphere surface area 3. Exit. Please

 Question 01: Write a menu driven Java program that displays the

following menu: 1. Calculate circle area. 2. Calculate sphere surface area 3.

Question 01: Write a menu driven Java program that displays the following menu: 1. Calculate circle area. 2. Calculate sphere surface area 3. Exit. Please select your choice: Your program must loop as long as the choice is not 3 or if there is InputMismatchException. If the choice is 1, the program prompts for and reads the circumference of a circle in centimeters. If the circumference is zero or negative, an error message is displayed, and the program displays the menu again after pressing the Enter key. If the circumference is valid, the program computes and displays the area of the circle in square centimeters and then it displays the menu again after pressing the Enter key. If the choice is 2, the program prompts for and reads the volume of a sphere in cubic centimeters. If the volume is zero or negative, an error message is displayed, and the program displays the menu again. If the volume is valid, the program computes and displays the surface area of the circle in square centimeters and then displays the menu again after pressing the Enter key. If the choice is not valid, an error message is displayed and then the menu is displayed again after pressing the Enter key. Your program must also: Compute and display the average circle area if the number of valid circles is not zero .Compute and display the average sphere surface area if the number of valid spheres is not zero Note: Your program must be general and it must behave as in the sample program runs below

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!