Difference between revisions of "Decorator"
m |
m |
||
Line 1: | Line 1: | ||
− | |||
− | |||
Attach additional responsibility to an object dynamically. Decoratores provide a flexible alternative to subclassing for extending functionality. | Attach additional responsibility to an object dynamically. Decoratores provide a flexible alternative to subclassing for extending functionality. | ||
[[Image:DecoratorUML.png|frame|UML Class diagram of the decorator pattern]] | [[Image:DecoratorUML.png|frame|UML Class diagram of the decorator pattern]] | ||
==Sample Code== | ==Sample Code== |