When I’m working on a group of classes that offer similar functionality, I’ll want to create a parent class or interface to share functionality or allow the children to be used polymorphically. Eclipse has a couple of refactoring tools that make the process of creating the parent easier. Ctrl-Alt-T to open the refactoring menu and then select Extract interface… or Extract superclass… depending on how you want your hierarchy to behave. Then, select the methods and fields that should be promoted to the parent and voila, Eclipse will create that supertype with the methods and fields you specified.
Today’s tip:
Ctrl-Alt-T, then Extract interface/superclass: moves methods and fields into a new parent supertype