Replace Inheritance with Delegation

From CSSEMediaWiki
(Difference between revisions)
Jump to: navigation, search
(New page: Straight from Martin Fowler 2003: "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 dele...)
 
Line 1: Line 1:
Straight from [[Martin Fowler 2003]]:
+
Straight from [[Martin Fowler 1999]]:
  
 
"A subclass uses only part of a superclasses interface or does not want to inherit data.
 
"A subclass uses only part of a superclasses interface or does not want to inherit data.

Revision as of 02:59, 23 September 2008

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."

See Also

Don't burn your base class

Personal tools