public class Rectangle implements Figure
{
   private double iWidth;
   private double iHeight;
   public Rectangle(final double pWidth, final double pHeight)
   {
      iWidth = pWidth;
      iHeight = pHeight;
   }
   public double area()
   {
      return iWidth*iHeight;
   }
   public double perimeter()
   {
      return (iWidth + iHeight)*2.0;
   }
   public String toString()
   {
      return "Rectangle(" + iWidth + "," + iHeight + ")";
   }
}
