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 functionsmethods 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
decimal places. The area of the base is calculated by: Area radius
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
decimal places. The volume is calculated by: Volume base area height
Use Math function Math.pow and
Math.Pl in your program.
d Ex: If the input is:
then the output is: Radius:
Height:
Base area:
Volume:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
