
Based on Java Programming 9th Edition by Joyce Farrell
Based on Book Java Programming 9th Edition by Joyce Farrell
Question:
Write a program that reads in the radius and length of a cylinder and computes the area and volume using the following formulas:
Bottom area = Radius * Radius * 3.14
Cylinder Volume = Bottom Area * Length
Cylinder area = (2 * Radius * 3.14 * Length) + (2 * Bottom area)
Your program should prompt the user to enter the radius and length of a cylinder.
The program should output the length and radius of the cylinder along with the area and volume of the cylinder.
Limit the output values to two decimal places.
Answer: - Partial Code
Scanner in = new Scanner(System.in);
// Prompt user to enter the radius here
System.out.print("Enter radius of cylinder here: ");
double radius = in.nextDouble();
// Prompt user to enter the length here
System.out.print("Enter length of cylinder here: ");
// Calculation of length, bottom Area, Volume and Area
double length = in.nextDouble();
double bo
// Prompt user to enter the radius here
System.out.print("Enter radius of cylinder here: ");
double radius = in.nextDouble();
// Prompt user to enter the length here
System.out.print("Enter length of cylinder here: ");
// Calculation of length, bottom Area, Volume and Area
double length = in.nextDouble();
double bo
GET YOUR SOURCE CODE
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. A quote would immediately follow then your solution.
Thank you!
Donate | Pay
Payment and Donations are through PayPal and Buy me a Coffee whichever you prefer. We are a nonprofit organization however we need funds to keep operating and to be able to complete our research and development projects. After we respond via email we will give you a quote then you will come back here and click the button below and make your payment.
ABOUT DEVELOPER: Earl JOSEPH
From the USA
I.T since Jan 2005
Avg. Response Time 1 hour
Last Code 1 Day
Language: English
Education
Degree: Information echnology
California USA