Question: 03 a. Provide a method areaCircle which takes one parameter radius as double, calculates 03 and returns the area of the circle as double. (Formula:
03 a. Provide a method areaCircle which takes one parameter radius as double, calculates 03 and returns the area of the circle as double. (Formula: Area=ar' Marks b. Provide a method circumCircle which takes one parameter radius as double, calculates and returns the circumference of the circle as double. (Formula: Circumference=2tr/ * Marks c. Provide a method sphereSurfaceArea which takes one parameter radius as double, 03 calculates and returns the surface area of the sphere as double. (Formula: Surface Marks Area=471"} d. Provide a method sphere Volume which takes one parameter radius as double, 03 calculates and returns the volume of the sphere as double. (Formula: Volume=4/3r" Marks Note: All the methods are static. Use Pl and power method from Math class. Create a class Shape Test which performs the following. 03 a. Read the radius from the user until radius is 0. Marks 05 b. Call the methods to display the area, circumference, surface area and volume. Marks Sample Output: Enter radius to stop (0) : 3 Area of the circle for the 3.00 radius = 28.27 Circumference of the circle for the 3.00 radius = 18.85 Surface area of the sphere for the 3.00 radius = 113.10 Volume of the sphere for the 3.00 radius = 113.10 Enter radius to stop (0) : 6 Area of the circle for the 6.00 radius = 113.10 Circumference of the circle for the 6.00 radius = 37.70 03 Surface area of the sphere for the 6.00 radius = 452.39 Marks Volume of the sphere for the 6.00 radius = 904.78 Enter radius to stop (0) : 4 Area of the circle for the 4.00 radius = 50.27 Circumference of the circle for the 4.00 radius = 25.13 Surface area of the sphere for the 4.00 radius = 201.06 Volume of the sphere for the 4.00 radius = 268.08 Enter radius to stop (0) 0 Thank you for using
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
