The code in the shape (java conventions recommends names like: Shape) class needs to be inside of a method.

Also posted here:...