// A class that represents a rectangle.
// Barry Cornelius, 20 June 2000
public class Rectangle extends Shape
{
   private int iWidth;
   private int iHeight;
   public Rectangle(final int pWidth, final int pHeight,
                    final int pX, final int pY)
   {
      super(pX, pY);
      iWidth = pWidth;
      iHeight = pHeight;
   }
   public Rectangle()     { this(0, 0, 0, 0); }
   public int getWidth()  { return iWidth; }
   public int getHeight() { return iHeight; }
   public boolean equals(Object rObject)
   { 
      return super.equals(rObject) 
	     && iWidth==((Rectangle)rObject).iWidth
             && iHeight==((Rectangle)rObject).iHeight;
   }
   public int hashCode() { return super.hashCode() + iWidth + iHeight; }
   public String toString()
   {
      return super.toString() + ":" + iWidth + ":" + iHeight;
   }
}
