Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

- Need and updated program written, old example on chegg will not work. C++ clas

ID: 3831877 • Letter: #

Question

- Need and updated program written, old example on chegg will not work.

C++ classes program

1.         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, accessor and modifier functions for all data members, and area and volume functions. Be sure to include all PRE/POST comments.

2.         Write Box.cpp. Be sure to include all PRE/POST comments.

3.         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:

tudent Enter number of snow globes to ship (0 to quit) 2 20 100 0 Number of snow globes 12 Number of shipping box 1 needed: 1 ost of packing material: $0.00 Cost of plastic wrap: $0.97 Total Cost: $0.97 Number of shipping box 2 needed: 1 Cost of packing material: $1.18 Cost of plastic wrap $1.23 otal Cost: $2.41 Ship Box 1 is recommended Number of snow globes: 20 Number of shipping box 1 needed: 2 Cost of packing material: $0.59 Cost of plastic wrap: $1.95 Total Cost: $2.53 Number of shipping box 2 needed: 1 Cost of packing material: $0.00 Cost of plastic wrap: $1.23 otal Cost: $1.23 Ship Box 2 is recommended. Number of snow globes: 100 Number of shipping box 1 needed: 9 Cost of packing material: $1.18 Cost of plastic wrap: $8.76 Total Cost: $9.93 Number of shipping box 2 needed: 5 Cost of packing material: $0.00 Cost of plastic wrap: $6.14 Total Cost: $6.14 Ship Box 2 is recommended Press any key to continue

Explanation / Answer

#include "box_class.h" #include using namespace std; int main() { double length; double width; double height; double volume; Box box; cout > length; box.setLength(length); cout > width; box.setWidth(width); cout > height; box.setHeight(height); //cout