Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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:

  1. Prompts the user to input the dimensions (in feet) of the container (radius of the base and the height).
  2. Prompts the user to input the shipping cost per liter.
  3. 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).
  4. 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

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

Object Databases The Essentials

Authors: Mary E. S. Loomis

1st Edition

020156341X, 978-0201563412

More Books

Students also viewed these Databases questions

Question

=+applying to all or most employers and employees?

Answered: 1 week ago

Question

=+associated with political parties and if so, which ones? Are

Answered: 1 week ago