
/**
 * class to model a square
 */

public class Square
    {
    protected int length ;

    public Square()
	{
	length = 0 ;
	} // end of constructor method

    public Square(int l)
	{
	length = l ;
	} // end of constructor method

    public int getLength()
	{
	return length ;
	} // end of method getLength

    public int area()
	{
	return length * length ;
	} // end of method area

    public int perimeter()
	{
	return length * 4 ;
	} // end of method perimeter

    } // end of class Square


