Question: . Specifications: Create a menu-driven program that finds and displays areas of 3 different objects. The menu should have the following 4 choices: 1 --
.
| Specifications: Create a menu-driven program that finds and displays areas of 3 different objects. The menu should have the following 4 choices: 1 -- square 2 -- circle 3 -- right triangle 4 -- quit If the user selects choice 1, the program should find the area of a square. If the user selects choice 2, the program should find the area of a circle. If the user selects choice 3, the program should find the area of a right triangle. If the user selects choice 4, the program should quit without doing anything. If the user selects anything else (i.e., an invalid choice) an appropriate error message should be printed. | Sample Run Program to calculate areas of objects
1 -- square 2 -- circle 3 -- right triangle 4 -- quit
2 Radius of the circle: 3.0 Area = 28.2743 |
Step 1: Once you have your program working, run it 4 times, each time testing a different valid menu choice. Then run it a fifth time using an invalid menu choice (such as 0 or 5). Make sure your program works correctly for all cases.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
