Write a C++ program that will display a menu similar to the one shown here:

1. Cube
2. Rectangular Prism
3. Sphere
4. Cone
5. Cyliner
6. Quit

The user will choose a shape (or quit) from the menu. Your program will prompt the user for the appropriate dimensions of the shape and display the surface area and volume of the shape, then return back to the menu.

Structurally, each shape must have one function to calculate the surface area and another to calculate the volume.

When inputting the dimensions for a shape, your program must enforce the rule that a dimension cannot be less than zero. Also check your valid input (cin.fail()) and allow the user to reenter bad data.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.