/** Box provides box-related methods.
 * @author Joel Adams, for Alice+Java
 *
 */

public class Box {
	/** instance variables to "remember" dimensions
	 */
	private double myLength;
	private double myWidth;
	private double myHeight;
	
	/** Box constructor
	 * @param length, a double
	 * @param width, a double
	 * @param height, a double
	 * Precondition: length > 0 && width > 0 && height > 0.
	 * Postcondition: myLength == length && myWidth == width
	 *                 && myHeight == height.
	 */
	public Box(double length, double width, double height) {
		myLength = length;
		myWidth = width;
		myHeight = height;
	}
	
	/** volume of a Box object (instance method)
	 * @return my volume (myLength x myWidth x myHeight)
	 */
	public double volume() {
		return myLength * myWidth * myHeight;
	}
	
	/** accessor methods for our instance variables
	 * 
	 */
	public double getLength() { return myLength; }
	public double getWidth() { return myWidth; }
	public double getHeight() { return myHeight; }
	
	/** volume of a box
	 * @param length, the (double) length of the box
	 * @param width, the (double) width of the box
	 * @param height, the (double) height of the box
	 * @return the volume of a box with those dimensions
	 */
	public static double volume(double length, double width, double height) {
		return length * width * height;
	}
}
