Question: GRADED ACTIVITY #5 (M7.2): DECISION CONTROL STRUCTURE (SWITCH) PROBLEM Instruction: The areas of the following figures are computed as follows: 1. trapezoid: (h/2) (b1+2) 2.

 GRADED ACTIVITY #5 (M7.2): DECISION CONTROL STRUCTURE (SWITCH) PROBLEM Instruction: The

GRADED ACTIVITY #5 (M7.2): DECISION CONTROL STRUCTURE (SWITCH) PROBLEM Instruction: The areas of the following figures are computed as follows: 1. trapezoid: (h/2) (b1+2) 2. ellipse: TT (r1+r2) 3. equilateral triangle: 3(a) 4 Using switch for the choices, write a Java program that will display a menu and the user can choose which figure to compute. When the user decides whether 1. Trapezoid, 2. 82 Ellipse, or 3. Equilateral Triangle, compute the area of the figure chosen and output the results. Depicted below are sample outputs when the program is executed (the items in bold characters are inputted by the user, while the items in bold italic characters are calculated and outputted by the program): Menu: Compute Area of 1. Trapezoid 2. Ellipse 3. Equilateral Triangle Choice: 1 Trapezoid Enter h: 3 Enter bl: 2 Enter b2: 2 Area of Trapezoid is 6 Menu: Compute Area of 1. Trapezoid 2. Ellipse 3. Equilateral Triangle Choice: 2 Ellipse Enter rl: 2 Enter r2: 3 Area of Ellipse is 18.85 Menu: Compute Area of 1. Trapezoid 2. Ellipse 3. Equilateral Triangle Choice: 3 Equilateral Triangle Enter a: 3 Area of Equilateral Triangle is 3.9

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!