When to use inheritance

I was just perusing my copy of Java Design: Building Better Apps and Applets by Peter Coad and Mark Mayfield and noticed a good set of rules to follow when thinking about using inheritance:

  1. “Is a special kind of”, not “is a role played by a”
  2. Never needs to transmute to be an object in some other class
  3. Extends rather than overrides or nullifies superclass
  4. Does not subclass what is merely a utility class (useful functionality you would like to reuse)
  5. Within PD(Problem Domain): expresses special kinds of roles, transactions, or devices

Update: I probably should mention that you should fulfill all or at least most of these to consider inheritance. Otherwise use composition or re-analyze your design.