Program Requirements: . Write a program that prompts the user to select either a circle, cube/rectangular prism, or sphe

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Program Requirements: . Write a program that prompts the user to select either a circle, cube/rectangular prism, or sphe

Post by answerhappygod »

Program Requirements: . Write a program that prompts the user toselect either a circle, cube/rectangular prism, or sphere.Calculate and display the following based on the selected shape: Cube/Rectangular Prism: Surface Area and Volume.  Circle: Area andCircumference.  Sphere: Surface Area and Volume. This program willbuild upon the requirements, calculations, and code with theaddition of adding the calculations for computing a sphere’ssurface area and volume. The program must have the following: Must print out a “header” to the user displaying information aboutwhat the program does.  Prompt the user to choose a shape andstore their choice as a variable.  Use either “if ‐else”statements or a “switch” statement to evaluate the user’s choiceand then prompt for the necessary dimensions of the selected shape.If the user enters a non‐valid shape display a message saying soand exit the program.  With the entered shapes dimensionscalculate the necessary calculation needed to be displayed based onthe information above.  For the circle and sphere, either promptthe user to enter a radius or randomly generate one.  For thecircle and sphere calculation, Pi, 𝜋, should be utilized with theMath class’s PI constant.  The programs output should neatlydisplay the shapes entered dimensions and the required informationfrom above. Round final calculations to 4 decimal places.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply