Just add a comment to "Etaoin" when you get the time, and if you are serious about doing OO, do a search in the "is-a" and "has-a" relationships in OO.
If the is-a relation is true (the apple is-a), then it is legal to use implements for the class, otherwise, if its has-a relation (car) has a wheel, but a car is not "wheel"), then implements NOT suitable - you need to use composition, in other words, a member variable of the class.
In the code, can you say that the Breakout "is-a" MouseMotionListener ? The answer is no, by the way! Breakout is-a game or application, but MOUSEMotionListener is part of the implementation .
As Etaoin said, you should implement MouseMotionListener as an inner class, although I prefer private inner classes rather than anonymous classes (to keep the constructor short and precise, among other reasons).
When you “get” OO, its great and very strong, but make real efforts to make a “paradigm shift” from procedural thinking.
source share