Question: CPS 1231 SI Session: Exercise 2 Elementary Programming (Ch2) 2. Write a program that reads in the radius and length of a cylinder and computes

 CPS 1231 SI Session: Exercise 2 Elementary Programming (Ch2) 2. Write

CPS 1231 SI Session: Exercise 2 Elementary Programming (Ch2) 2. Write a program that reads in the radius and length of a cylinder and computes the area and volume using the following formulas: area = radius * radius * pi volume = area * length --Sample Run-- Enter the radius and length of a cylinder: 5.5 12 Enter The area is 95.6339975 The volume of the cylinder is 1140.39717 2-1. How many variables would you need? (1 point) 2-2. What datatype should you assign to the corresponding variables? (1 point) 2-3. Using the Scanner class for the console input, should you invoke the .nextInt() or .nextDouble() method? Why? (1 point) 2-4. Using a flowchart, Pseudocode and/or comments, show how you will structure your program. (1 point) 2-5. Name you class (program) SISession and show your running code. (1 point)

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!