In: Computer Science
use java
The area of a circle is computed by ?? 2 , where r is the radius of the circle and π is 3.14. The area of a rectangle is computed by ??, where a and b correspond to the length and width of the rectangle respectively. The area of a triangle is computed by ah 2 , where a and h correspond to the length and height of the triangle respectively. Write a Java program: First it asks which one of these three shape’s area needs to be calculated. After the user chooses a shape, it asks for the corresponding parameters, and then displays the computed area.
As you mentioned I have designed the program which meets your requirements.
outputs: