A program that will determine the area of a geometric shape.
- Area of a Square
- a = side
- A = a2
- Area of a Circle
- r = radius
- A = pi*r2
- Area of an Ellipse
- a = radius 1
- b = radius 2
- A = pi*ab
- Area of a Pentagon
- a = side
- A = 1/4(sqrt(5(5+2*sqrt(5))a2)
- Use a menu for shape choices.
- Each shape will require one or two inputs.
- Implement if/else statements to act on the user's shape choice outputting both the formula and the results.
- Implement a Switch/Case blok to act on the user's shape choice outputting both the formula and the results.
- Comment out either the if/else or switch case allowing only one set to run per session.
- The formula should output before the results.
- Utilize the Java Math class.
- import static java.lang.Math.*;
- System.exit(0);
- System.exit(1);
- Utilize default case in Switch/Case block.