Hello to everybody. I'm the newest member of this forum.
For my first thread I ask you who can resolve this exercise and publish the code in this forum?
EXERCISE:
Implement a subclass Square that extends the Rectangle class. In
the constructor, accept the x- and y-positions of the center and the side length of
the square. Call the setLocation and setSize methods of the Rectangle class.
Look up these methods in the documentation for the Rectangle class. Also supply
a method getArea that computes and returns the area of the square.Write a sample
program that asks for the center and side length, then prints out the square (using
the toString method that you inherit from Rectangle) and the area of the square.