//Rectangle Implementation
//by www.neiljohan.com

public class Rectangle implements Figure
{
    double Width = 0;
    double Height = 0;

    public Rectangle()
        {
        }
    
    public Rectangle(final double tWidth,final double tHeight)
        {
            Width = tWidth;
            Height = tHeight;
        }
    
    public double area()
        {
            return Width*Height;
        }
    
    public double perimeter()
        {
            return 2*(Width + Height);
        }
    
    public String toString()
        {
            return "Rectangle(" + Width + "," + Height + ")";
        }
}
