Question: USING JAVA PROGRAMMING A circular prism, or cylinder, has a radius and height, see the diagram on the right. Write a Java program that prompts

USING JAVA PROGRAMMING

A circular prism, or cylinder, has a radius and height, see the diagram on the right. Write a Java program that prompts and reads from the user an integer value for the radius and likewise an integer value for the height. Then the program will calculate the total surface area and finally display the values for the radius, height, and the total surface area. We note that the total surface area for the circular prism on the right is 2r 2

+ 2rh.

If a student does the work merely within the main method, the work will not receive more than 2/3 of the total allocated marks. To achieve the full mark, students need to create a constructor that takes radius and height as the parameters to create a cylinder object, and create a method for the class to do the calculation of the surface area.

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!