You are never initialising the Point2D objects in your MyRectangle class. In your constructor (or in the declaration) you need to create new objects for these. For example, your method setBottomLeftPoint attempts to do something like null.setLocation(...).
OR, simply assign the Point2D objects that you are passing to your constructor to your instance variables.
Joined: Oct 02, 2009
a lot of thanks.It seems I didn't understand that staff thoroughly.