Can anyone help me with this task ?

Implement a subclass Square that extends the Rectangle class. In the constructor, accept the the x- and y- coordinates of the centre and the siude length of the square. call the setLocation and setSize methods of the rectangle class (look these up !!) Also supply a method getArea that returns the area of the square. Write a test class that makes use of the square class.


So far I have this:



public class Square

{
private int length;
Square (int l) {
this.length =l;
}

public void setLength(int l)

{
this.length =l;
}

}

public int getArea() {
return this.length*this.length;


How do i finish it off ?

Theres a drink via Paypal in it for ya !!