import java.lang.IllegalArgumentException;

class Box {

	// instance variables - fields
	
	private int height;
	private int width;
	private int length;
	private int weight;

	// constructors

	public Box() {
		height = 1;
		width = 1;
		length = 1;
		weight = 1;
	}

	public Box(int h, int w, int l) {
		if (h <= 0 || w  <= 0 || l <= 0) {
			throw new IllegalArgumentException();
		}

		height = h;
		width = w;
		length = l;

		weight = 1;
	}

	public Box(int h, int w, int l, int weight) {
		if (h <= 0 || w  <= 0 || l <= 0 || weight <= 0) {
			throw new IllegalArgumentException();
		}

		height = h;
		width = w;
		length = l;
		this.weight = weight;
	}

	public String toString() {
		return "(" + height + "," + width + "," + length + ")";
	}

	// accessor/modifier methods for each field

	public int getHeight() { return height; }
	public int getLength() { return length; }
	public int getWidth() { return width; }
	public int getWeight() { return weight; }
		
	public void setHeight(int h) { 
		if (h <= 0) {
			throw new IllegalArgumentException();
		}
		this.height = h; 
	}

	public void setLength(int l) { 
		if (l <= 0) {
			throw new IllegalArgumentException();
		}
		length = l; 
	}

	public void setWidth(int w) { 
		if (w <= 0) {
			throw new IllegalArgumentException();
		}
		width = w; 
	}	

	public void setWeight(int w) {
		if (w < 0) {
			throw new IllegalArgumentException();
		}
		this.weight = w;
	} 
		
	public int getVolume() {
		return (height * width * length);
	}



}
