Material needed to create an open box

Komodo

New member
Joined
Sep 21, 2017
Messages
1
I have a programming assignment that requires the user to input length, width, height and thickness of an open box. (i.e. 5 sides including the bottom should also have thickness) and figure out how much material is needed to create that box. I am pretty sure I am trying to find the inner volume (L*W*H) and subtract that from the outside volume. I have tried drawing it out and I know it should be trivial, but every time I try to calculate thickness the answer doesn't match up with what it should be. L = 15cm W = 12cm H = 6cm and thickness = 1cm, which should equal 430 cubed cm according to the sample.

I was just wondering if you guys could point me in the right direction, I've tried finding he SA of all the sides and adding them up, I've tried (L+2t)(W+2t)(H+t), and a bunch of other ways, but when I start the subtraction I never end up with the correct answer. I'm just hitting a mental road, I think the bottom thickness is what is throwing me off.

I appreciate any help that is given, thank you.
 
I have a programming assignment that requires the user to input length, width, height and thickness of an open box … and [then the program figures] out how much material is needed to create that box. I am pretty sure I am trying to find the inner volume (L*W*H) and subtract that from the outside volume …

… L = 15cm W = 12cm H = 6cm and thickness = 1cm, which should equal 430 cubed cm according to the sample.
Using L, W, and H for the inside measurements, I get a larger volume of material.

Are you sure that the user is supposed to input the interior dimensions of the box?
 
I had some extra time, so I reworked the exercise.

I think the user is supposed to input the outside dimensions of the box.

If I were programming this, I would view the base and four walls as five separate rectangular solids.

I would use the input dimensions for length, width, and thickness as the dimensions of the base.

Each of the four walls will sit on top of the base. The walls all have the same thickness as the base.

Clearly, the walls cannot have the same height as the box (because they are sitting on top of the base). We need to express the height of the walls in terms of the thickness.

Also, one pair of opposite walls will need their length shortened; otherwise, the walls at each corner would be trying to occupy the same space. Therefore, we need to express the length of two (opposite) walls in terms of the thickness.

Once I had expressions for the dimensions of each wall, I would calculate the volume of the base and the volume of each wall, and then I would sum these five volumes. :cool:
 
Last edited:
Will also handle "closed boxes", since you simply
need an extra "base" to "cover up"!
Agree, if simply also includes a further reduction of the wall-height, so that the input box-height is maintained after placing the lid (i.e., another "base") on top of the walls. :cool:
 
Top