Sunday, May 13, 2007

Decorator

Attaches additional responsibilities to an object dynamically. Provides a flexible alternatives to subclassing for extending functionality.

eg (Star-Buzz Coffee)

real-world

- java.io (FileInputStream -component (Buffered Input Stream -decorator)

No comments: