package shapes;

public class Rectangle extends Shape {
    private double length; 
    private double width; 

    public Rectangle(String name, double len, double  wid) { 
       super( name ); 
       length = len; 
       width = wid; 
    } 

    public double getArea( ) {
       return length * width;
    }

    public double getLength(){
       return length;
    }   

    public double getWidth(){ 
      return width; 
    } 

    public String toString(){ 
       return super.toString() + ",length=" + length + ",width=" + width; 
    } 
 } 

