Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions