What's new

MIT needs TYM's Help (For his computer science project)

Ok guys, I have to design a C++ program that will calculate the estimated costs of making plastic boxes. (Basic facts of the box are listed below)
*The shape of the boxes are rectangular
*each box has 4 sides and a bottom
*the exterior (outside) length and width of the box will be specified in centimeters. The length and width include the thickness of the sides of the box.
*the exterior (outside) height of the sides of the box will be specified in centimeters and will include the thickness of the bottom
*the thickness of the sides and bottom of the box will be the same and will be specified in centimeters
*the current cost of the plastic used is $0.045 per cubic centimeter
*Overhead and other costs are estimated to be 20% of the cost of the plastic used

My program must:
*Use named constants to represent fixed (given) values
*Declare the variables as double type values except for the number of boxes which should be an int.
(number of boxes to be manufactured (int))
(the exterior length of the box (in centimeters))
(the exterior width of the box (in centimeters))
(the exterior height of the box (in centimeters)
(the thickness of the sides and bottom (in centimeters)

I have to:
*determine the amount of plastic needed in cubic centimeters
*determine the estimated cost of the plastic needed
*determine the estimated overhead cost

Also: I have to come up with a formula to calculate how much plastic will be needed for a box (calculated piecewise)

Assumptions:
*Input values will be entered in the order specified above and will have the specified data type
*all input values will be greater than 0
*The dimensions of the box will make sense (2 times thickness will be less than length or width)

Main issue I am having: Coming up with the formula to calculate how much plastic is needed. If you guys have any input to give me for help or want to know what I am trying to accomplish feel free to post your comments and I will reply immediately. Also thanks!
 

Konqrr

MK11 Kabal = MK9 Kitana
The volume (V) of a rectangle is V = Length (L) x Width (W) x Height (H)
Calculate the volume of the entire thing as if it was a solid box, then calculate the volume of the inside of the box that is void of material and subtract it from the first volume. That will be your cubic centimeters of plastic.

So... Thickness = T:

Initial volume - (L - 2xT [two sides]) x (W - 2xT) x (H - T [no top, just a bottom])) = cubic centimeters of plastic needed per box
 
The volume (V) of a rectangle is V = Length (L) x Width (W) x Height (H)
Calculate the volume of the entire thing as if it was a solid box, then calculate the volume of the inside of the box that is void of material and subtract it from the first volume. That will be your cubic centimeters of plastic.

So... Thickness = T:

Initial volume - (L - 2xT [two sides]) x (W - 2xT) x (H - T [no top, just a bottom])) = cubic centimeters of plastic needed per box
Ahhhh that makes a lot more sense, thanks a ton