Question: Write a Java program: a . Write a main program - i . that reads a cone's radius, height from input. Call the functions /

Write a Java program:
a. Write a main program -
i. that reads a cone's radius, height from input. Call the functions/methods to calculate the
area of the cone, and volume of the cone.
ii. Then, call findBaseArea() to solve the cone's area and call findVolume() solve the cone's
volume.
b. Define a method named findBaseArea() to calculate the cone's area. The function has one double
parameter as a con's radius. The method returns the area of the cone's base as a double with 2
decimal places. The area of the base is calculated by: Area =** radius ?2
c. Defined a second method named findVolume() to calculate the cone's volume. The function has
two double parameter as a con's radius and height. The method returns the cone's volume as a
double and uses the findBaseArea() method to calculate the cone's base area as a double with 2
decimal places. The volume is calculated by: Volume = base area ** height **13
** Use Math function Math.pow (x,y) and
Math.Pl in your program.
d. Ex: If the input is: 2.0,5.0
then the output is: Radius: 2.0
Height: 5.0
Base area: 12.60
Volume: 20.90
Write a Java program: a . Write a main program -

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 Programming Questions!