The Decorator design pattern solves
problems like:
How can responsibilities be
added to an object dynamically?
How can the functionality of an object be
extended at run-time?
See Applicability section for all problems Decorator can solve.
See Solution section for how Decorator solves the problems.
Subclass1) is instantiated, the
functionality is bound to the instance for its
life-time
and can't be changed at run-time.