Question: Create a package named Q 2 for your program. Give your java class an appropriate name. The program will The user must be asked to

Create a package named Q2 for your program.
Give your java class an appropriate name.
The program will
The user must be asked to enter the height and radius for the cone they wish to compute the volume for.
The program will then output the volume of the cone up to two decimal places using the printf() method. The volume of a cone is given by "#!$, where r is the radius of the base of in the sample output.
print the header information with a brief description of the task as shown the cone and h is the height of the cone. Hint:
Sample Output:
**************************************************** Full Name:
Student Number:
Date:
% Instead of declaring a variable (or final identifier) PI and initialize it with a value
3.14159265, you can use Math.PI field in the volume expression; In Math class, the filed PI (upper case P and I) has been declared as a public static final double type data field.

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