Question
C++ Amanda and Tyler opened a business that specializes in shipping liquids, such as milk, juice, and water, in cylindrical containers. The shipping charges depend
C++
Amanda and Tyler opened a business that specializes in shipping liquids, such as milk, juice, and water, in cylindrical containers. The shipping charges depend on the amount of liquid in the container. (For simplicity, you may assume that the container is filled to the top.) They also provide the option to paint the outside of the container for a reasonable amount. Write a program that does the following:
- Prompts the user to input the dimensions (in feet) of the container (radius of the base and the height).
- Prompts the user to input the shipping cost per liter.
- Prompts the user to input the paint cost per square foot. (Assume that the entire container including the top and bottom needs to be painted).
- Separately outputs the shipping cost and the cost of painting.
Your program must use class cylinder to store the radius of the base and the height of the container. Class container should inherit from class cylinder. Class container should store shipping cost per liter, paint cost per square foot and should have functions to calculate shipping cost and cost of painting.
Test your program by creating two objects of class container like smallContainer and largeContainer.
Note
1 cubic feet = 28.32 liters or 1 liter = 0.353146667 cubic feet
Surface Area of a Cylinder (A)
A = 2rh + 2r2
Volume of a Cylinder (V)
V = r2h
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started