Convert generalization relationships to associations whenever possible. Associations keep the design more flexible.
Define a common base class that contains the behavioral contract for child classes to inherit. All child classes in the
hierarchy must maintain this contract. In other words, maintain the "is-a" relationship between children and their
parents. Consider moving child classes out of the hierarchy if they cannot maintain the behavioral requirements set
forth in the base class.
Reduce the depth of the generalization hierarchy. Hierarchies more than 2 levels deep begin to be difficult to
maintain.
Refactor the generalization hierarchy if its purpose has become unclear or distorted.
|