The top of the class hierarchy should be abstract
From CSSEMediaWiki
Revision as of 01:27, 18 August 2009 by Stephen Fitchett (Talk | contribs)
This idea is very tightly related to Riel's heuristic Avoid concrete base classes. It states that the class at the top of a class hierarchy should be abstract, and if it is not then there may be a design problem. If a subclass B overrides methods in its concrete superclass A, it may indicate that there should be a common abstract superclass to A and B which defines common behaviour; then neither A or B need to redefine any methods. Any example of this is given in Avoid concrete base classes.