Instruction: The areas of the following figures are computed as follows: 1. trapezoid: (h/2) (b1+b2) 2. ellipse: T (rl*r2) 3. equilateral triangle: 3 (a') 4 Using switch for the choices, create a...


pls put comments in the code explaining what each line does


Instruction:<br>The areas of the following figures are computed as follows:<br>1. trapezoid: (h/2) (b1+b2)<br>2. ellipse: T (rl*r2)<br>3. equilateral triangle:<br>3 (a')<br>4<br>Using switch for the choices, create a flowchart and a java program that will display a<br>menu and the user can choose which figure to compute.<br>

Extracted text: Instruction: The areas of the following figures are computed as follows: 1. trapezoid: (h/2) (b1+b2) 2. ellipse: T (rl*r2) 3. equilateral triangle: 3 (a') 4 Using switch for the choices, create a flowchart and a java program that will display a menu and the user can choose which figure to compute.
The user decides whether 1. Trapezoid, 2. Ellipse, or 3. Equilateral Triangle. Compute the<br>area of the figure chosen and output the results.<br>Depicted below are sample outputs when the program is executed (the items in bold<br>characters are inputted by the user, while the items in bold italic characters are<br>calculated and/or outputted by the program):<br>Menu: Compute Area of<br>1. Trapezoid<br>2. Ellipse<br>3. Equilateral Triangle<br>Choice: 1<br>Menu: Compute Area of<br>1. Trapezoid<br>2. Ellipse<br>3. Equilateral Triangle<br>Choice: 2<br>Menu: Compute Area of<br>1. Trapezoid<br>2. Ellipse<br>3. Equilateral Triangle<br>Choice: 3<br>Trapezoid<br>Enter h: 3<br>Ellipse<br>Enter rl: 2<br>Equilateral Triangle<br>Enter a: 3<br>Enter bl: 2<br>Area of Equilateral<br>Triangle is 3.9<br>Enter r2: 3<br>Enter b2: 2<br>Area of Ellipse is 18.85<br>Area of Trapezoid is 6<br>Required: The flowchart, the java file (FamilyName_Figure.java) containing the code<br>and 3 image files (Sample1, Sample2, and Sample3) containing different sample<br>input/output of the program.<br>

Extracted text: The user decides whether 1. Trapezoid, 2. 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/or outputted by the program): Menu: Compute Area of 1. Trapezoid 2. Ellipse 3. Equilateral Triangle Choice: 1 Menu: Compute Area of 1. Trapezoid 2. Ellipse 3. Equilateral Triangle Choice: 2 Menu: Compute Area of 1. Trapezoid 2. Ellipse 3. Equilateral Triangle Choice: 3 Trapezoid Enter h: 3 Ellipse Enter rl: 2 Equilateral Triangle Enter a: 3 Enter bl: 2 Area of Equilateral Triangle is 3.9 Enter r2: 3 Enter b2: 2 Area of Ellipse is 18.85 Area of Trapezoid is 6 Required: The flowchart, the java file (FamilyName_Figure.java) containing the code and 3 image files (Sample1, Sample2, and Sample3) containing different sample input/output of the program.

Jun 09, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here