public class Rectangle extends Shape
{
   private int iWidth;
   private int iHeight;
   public Rectangle(int pX, int pY, int pWidth, int pHeight) {
      super(pX, pY);  iWidth = pWidth;  iHeight = pHeight;
   }
   public int getWidth()
   {
      return iWidth;
   }
   public int getHeight()
   {
      return iHeight;
   }
   public Rectangle translate(int pX, int pY)
   {
      return new Rectangle(getX() + pX, getY() + pY, iWidth, iHeight);
   }
   public boolean equals(Object pObject) { 
      return super.equals(pObject) 
	     && iWidth==((Rectangle)pObject).iWidth
             && iHeight==((Rectangle)pObject).iHeight;
   }
   public String toString()
   {
      return super.toString() + ":" + iWidth + ":" + iHeight;
   }
}
