Replace Inheritance with Delegation
From CSSEMediaWiki
Revision as of 07:21, 7 October 2010 by Joey Scarr (Talk | contribs)
Straight from Martin Fowler 1999:
"A subclass uses only part of a superclasses interface or does not want to inherit data.
Create a field for the superclass, adjust methods to delegate to the super class, and remove the subclassing."