C++ classes program Class specification Box. h models a box. Include private data for length, width, and height. Include a default constructor setting box dimensions to 1 x 1 x 1, a parameterized...


C++ classes program Class specification
Box. h
models a box. Include private data for length, width, and height. Include a default constructor setting box dimensions to 1 x 1 x 1, a parameterized constructor where the user passes in dimensions, a destructor, accessory and modifier functions for all data members, and area and volume functions. Be sure to include all
PRE/POST
comments. Write
Box.cpp. Be sure to include all
PRE/POST
comments. Write an application which uses
Box
objects. The company sells snow globes which come in a 4 inch by 4 inch by 4 inch box. There are two shipping boxes, one is 16 x 12 x 4 inches and the other is 20 x 8 x 8 inches. For a number of orders, the company would like to know how many shipping boxes are required and the shipping costs where packing bubble material is $0.0023 per cubic inch and external plastic wrap is $0.0016 per square inch. Packing bubble material is only needed on a partially filled shipping box. Code should use three
Box
objects, one for the snow globe and one for each ship box. Class functions must be called when needed, for example, the volume function is needed to compute the cost of packing bubbles and the area function is needed to compute the cost of plastic wrap around the outside of the box. Code should be reusable; changes to size of the ship box or the cost of packing material should require only minor code change. Input: The user will enter the number of snow globes to be shipped. The user can enter as many orders as desired using 0 as a sentinel.


Sample:



May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here