
/**
 * class to model a Rectangle
 */

public class Rectangle extends Square
    {
    private int breadth ;

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

    public Rectangle(int l, int b)
	{
	length = l ;
	breadth = b ;
	} // end of constructor method

    public int getBreadth()
	{
	return breadth ;
	} // end of method getBreadth

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

    public int perimeter()
	{
	return (length + breadth) * 2 ;
	} // end of method perimeter

    } // end of class Rectangle


