i don't know the error in my program>>>>> java
<pre><code>    public class Assign2Shape
    {
    private String nameOfShape;



    public void setNameOfShape(String theNameOfShape)
    {
        nameOfShape = theNameOfShape;
    }



    public String getNameOfShape()
    {
        return nameOfShape;
    }



    public Assign2Shape()
    {
     nameOfShape = "no name yet";
    }



    public Assign2Shape(String theNameOfShape)
    {
        nameOfShape = theNameOfShape;
    }



    public void writeOutput(String theNameOfShape)
    {

        System.out.println(getNameOfShape());
    }
};

public class Assign2Square extends Assign2Shape
{
    private int height, length, area;


    public void setHeight(int oneHgight)
    {
        height = oneHgight;
    }

        public void setLength(int oneLength)
    {
        length = oneLength;
    }


    public void setArea(int oneArea)
    {
        area = oneArea;
    }


    public int getHeight()
    {
        return height;
    }


        public int getLength()
    {
        return length;
    }


    public int getArea()
    {
        return height*length;
    }



    public Assign2Square()
    {
        super();
        height =0;
        length =0;
    }


    public Assign2Square(String theNameOfShape,int oneHgight, int oneLength)
    {
        super(theNameOfShape);
        height = oneHgight;
        length = oneLength;
    }


    public void writeOutput(String theNameOfShape, int oneHgight, int oneLength)
    {
        super.writeOutput(theNameOfShape);
        System.out.println(getHeight()+ getLength());


    }

};

public class Assign2Driver
{
    public void main (String [] args)
    {
        Assign2Square obj1 = new Assign2Square();
        Assign2Square obj2 = new Assign2Square();

        obj1.setHeight(23);
        obj1.setLength(10);
        obj1.writeOutput("Square",10 23);
        System.out.println("the height: " + obj1.getHeight());
        System.out.println("the length: " + obj1.getLength());
        System.out.println("the length: " + obj1.getArea());

    }
}
</code></pre>
