Question: Write a main method that prompts the user for two doubles that are the radius and height of a cylinder. Calculate the volume and the

 Write a main method that prompts the user for two doubles

Write a main method that prompts the user for two doubles that are the radius and height of a cylinder. Calculate the volume and the area as given by following two equations, using Math.pow) and Math.PI and print the results. Print the results to one decimal place using DecimalFormat. Volume- Ttr2h Area 2rtrh Sample Output Enter Radius: 5.2 Enter Height: 8.1 Volume: 688.1 cubic inches. Surface Area: 264.6 square inches. LAB ACTIVITY 5.18.1: duringLab: Cylinder 0/2 Main.java Load default template... 1 public class Main { 2 public static void main(Stringt] args) * Type your code here. */

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!