Question: Design a Box class (Box.java) with data members for integer length, width, and height, accessor and modifier methods and methods for area and volume. Include

 Design a Box class (Box.java) with data members for integer length,width, and height, accessor and modifier methods and methods for area andvolume. Include a default constructor setting dimensions to 1 and a parameterized

Design a Box class (Box.java) with data members for integer length, width, and height, accessor and modifier methods and methods for area and volume. Include a default constructor setting dimensions to 1 and a parameterized constructor where the user passes in desired dimensions. Include PRE and POST comments. Test the Box class before writing the application. Write an application (A6YourName.java) which uses Box objects. The company sells snow globes which come in a variety of cubic container boxes measured in inches. Some quantities of a snow globe (one size only) need to be shipped from one store to another. The company would like to know how many shipping boxes of various types are required and the cost for each. Packing material costs S0.0023 per cubic inch. Packing material is only needed on partially filled shipping boxes. Plastic wrap around the sealed box costs $0.0012 per square inch. Input: The user will enter the dimensions of the shipping box. Valid dimensions are multiples of 4 inches (Ex. 4 x 8 x 12 box is acceptable while 3 x 7 x 16 box is not valid). The user enters the box cost. The user enters the snow globe dimension. Valid dimensions are multiples of 4 such that at least one globe fits in the box. (Ex. If the shipping box is 4 x 8* 8 inches, then the snow globe cannot be 8 inches or more as not even one fits.) Use error detection loops to ensure valid data (see Test Case 1) The main loop allows the user to input any number of orders, using value 0 as the sentinel (see Test Case 2) Design a Box class (Box.java) with data members for integer length, width, and height, accessor and modifier methods and methods for area and volume. Include a default constructor setting dimensions to 1 and a parameterized constructor where the user passes in desired dimensions. Include PRE and POST comments. Test the Box class before writing the application. Write an application (A6YourName.java) which uses Box objects. The company sells snow globes which come in a variety of cubic container boxes measured in inches. Some quantities of a snow globe (one size only) need to be shipped from one store to another. The company would like to know how many shipping boxes of various types are required and the cost for each. Packing material costs S0.0023 per cubic inch. Packing material is only needed on partially filled shipping boxes. Plastic wrap around the sealed box costs $0.0012 per square inch. Input: The user will enter the dimensions of the shipping box. Valid dimensions are multiples of 4 inches (Ex. 4 x 8 x 12 box is acceptable while 3 x 7 x 16 box is not valid). The user enters the box cost. The user enters the snow globe dimension. Valid dimensions are multiples of 4 such that at least one globe fits in the box. (Ex. If the shipping box is 4 x 8* 8 inches, then the snow globe cannot be 8 inches or more as not even one fits.) Use error detection loops to ensure valid data (see Test Case 1) The main loop allows the user to input any number of orders, using value 0 as the sentinel (see Test Case 2)

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!