Lecture overview -- Keyboard shortcut: 'u'  Previous page: The Decorator Pattern -- Keyboard shortcut: 'p'  Next page: The Decorator Pattern and Streams -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 39 : 40
Object-oriented Programming in C#
Input and Output Classes
The Decorator Pattern at Run Time

Two decorator objects of a ConcreteComponent object

  • Decorators can be added at run-time

  • A client accesses the outer Component (typically a ConcreteDecorator).

  • A decorator does part of the work, and delegates the rest to the next Component in the chain

Use of Decorator can be seen as a dynamic alternative to static subclassing