Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help with this C++. I'm using the program Microsoft Visual Studio 2013 for my code. A local scientific lab stores hazardous chemicals for local manufacturing

Help with this C++. I'm using the program Microsoft Visual Studio 2013 for my code.image text in transcribed

A local scientific lab stores hazardous chemicals for local manufacturing companies until they can be properly disposed of. The lab would like for you to write a C++ program to calculate the storage charges based on the volume of the shape required for the particular material being stored. The user will enter the name of the company requesting the storage, the desired shape for the chemical being stored via a menu option, and the dimensions of the shape. bullet Build an appropriate menu for the user that displays the three choices of shapes available with an option to also quit the program. Prompt the user for the desired menu choice. If the menu choice is invalid, display an error message. bullet Read the dimensions of the desired shape from the user. Calculate the volume of the desired shape, the handling charge, and the storage charge based on the volume. Also calculate the total charges. Display the name of the company requesting the service, the name of the chosen storage shape, the dimension of the shape, the calculated volume to a tenth of a decimal point, the handling charge, the storage charge, and the total charges based on the following criteria table. (Use symbolic constants where appropriate. Use 3.1416 to represent the value of PI.) The formulas for the volumes are: Volume of a cylinder = pi r^2:h Volume of a sphere = 4/3 pi r^3 Volume of a cone = 1/3 times pi r^2 h The Storage and Handling charge are based on the following criteria: Sample Input #1: Enter the Company name: World Bus Company Please enter your choice of shape from the following menu: Cylinder Sphere Cone Quit Enter Menu Choice:? 3 Enter the radius of the cone:? 5.3 Enter the height of the cone:? 9.4 Sample Output: Storage Bill for Ward Bus Company Dimensions of the cone: Radius: 5.3 inches Height: 9.4 inches Volume: 2 76.5 cubic inches Handling Charge....................$10.50 Storage Charge.....................$9.28 Total Charges....................$19.78 Sample Input #2: Enter the company name: X-Ray Chemicals Please enter your choice of shape from the following menu: Cylinder Sphere Cone Quit Enter Menu Choice:? 2 Enter the radius of the sphere;? 7.5 Sample Output: Storage Bill for X-Ray Chemicals Dimensions of the sphere: Radius: 7.5 inches Volume: 1767.1 cubic inches Handling Charge....................$15.25 Storage Charge.....................$637.72 Total Charges....................... $652.97

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 Concepts

Authors: David Kroenke, David J. Auer

3rd Edition

0131986252, 978-0131986251

More Books

Students also viewed these Databases questions

Question

i. What was the outcome of the interaction?

Answered: 1 week ago