Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Box {
- private double height;
- private double width;
- private double depth;
- private boolean full = false;
- Box(double height, double width, double depth, boolean full) {
- this.height = height;
- this.width = width;
- this.depth = depth;
- this.full = false;
- }
- /**
- * @return the height
- */
- public double getHeight() {
- return height;
- }
- /**
- * @param height the height to set
- */
- public void setHeight(double height) {
- this.height = height;
- }
- /**
- * @return the width
- */
- public double getWidth() {
- return width;
- }
- /**
- * @param width the width to set
- */
- public void setWidth(double width) {
- this.width = width;
- }
- /**
- * @return the depth
- */
- public double getDepth() {
- return depth;
- }
- /**
- * @param depth the depth to set
- */
- public void setDepth(double depth) {
- this.depth = depth;
- }
- /**
- * @return the full
- */
- public boolean isFull() {
- return full;
- }
- /**
- * @param full the full to set
- */
- public void setFull(boolean full) {
- this.full = full;
- }
- /* (non-Javadoc)
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString() {
- return height + "x" + width + "x" + depth;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement