Question: Build and test functions for a program that calculates information about the boxes that can be made from a sheet of cardboard. Say we have

 Build and test functions for a program that calculates information about

Build and test functions for a program that calculates information about the boxes that can be made from a sheet of cardboard. Say we have a sheet of cardboard that has a width of y and a length of z. We can make cuts of size x, then fold the sides up to make a box with the dimensions y - 2x by z - 2x by x

Please help with c++

C++ Function Building functions described below are implemented and working. Each function needs at least one test. Many will require more than one. For example, you should make sure the getMax Height function works correctly with boxes that are wider than they are long and vice versa. Here is what two tests of getMaxHeight might look like: int result1 = getMaxHeight(6, 8); cout 0). int getArea(int width, int length) For a given width and length, return area of the corresponding rectangle. int getVolume(int width, int length, int height) For a given width, length and height, return volume of corresponding box. This MUST use getArea as a helper for full credit. int getWaste(int cutoutSize) For a given size cutout (x), return the total waste produced (total area cut out at the corners). getWaste(3) should return 36. C++ Function Building functions described below are implemented and working. Each function needs at least one test. Many will require more than one. For example, you should make sure the getMax Height function works correctly with boxes that are wider than they are long and vice versa. Here is what two tests of getMaxHeight might look like: int result1 = getMaxHeight(6, 8); cout 0). int getArea(int width, int length) For a given width and length, return area of the corresponding rectangle. int getVolume(int width, int length, int height) For a given width, length and height, return volume of corresponding box. This MUST use getArea as a helper for full credit. int getWaste(int cutoutSize) For a given size cutout (x), return the total waste produced (total area cut out at the corners). getWaste(3) should return 36

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!