// CIS-73 - Bristol Community College
// A Demo Class Cube with a constructor and getters for its
// attribute. This file has no main and is not executeable.   

public class Cube extends Rectangle
{
    private int height;

    public Cube(int len, int w, int h)
    {
        // Call the superclass constructor.
        super(len, w);

        height = h;
    }

    public int getHeight()
    {
        return height;
    }

    public int getSurfaceArea()
    {
        return calculateArea() * 6;
    }

    public int getVolume()
    {
        return calculateArea() * height;
    }
}

