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.