Design and implement a class called box


Design and Implement a class called "Box" that contains instance data (all doubles) that represents the height, width, and depth of the box. Also include a boolean variable called "full" as instance data that represents if the box is full or not. Define the "Box" constructor to accept and initialize the height, width, and depth of the box. Each newly created "Box" is empty (the constructor should initialize "full" to "false".) Include getter and setter methods for all instance data. Add methods, "volume" and "surfaceArea" that compute and return the volume and surface area, respectively of the Box. Include a toString method that returns a one-line description of the box (its height, width, and depth and whether it is full). Create a driver class called "BoxTest", whose main method instantiates and updates several "Box" objects.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Design and implement a class called box
Reference No:- TGS0142368

Expected delivery within 24 Hours