Java Reference
In-Depth Information
1. Extend the shop example given earlier by adding more discount decorators and introducing
more qualii ers to gain i ner control over which decorators are invoked for which concrete
2. Implement the decorator pattern on an existing API to add new functionality.
For example:
3. Create a decorator that adds behavior to a bank account system such that when the client
withdraws more than a certain amount of cash, an SMS text message is sent to the client
advising of the withdrawal.
1. Design Patterns: Elements of Reusable Object‐Oriented Software (Addison‐Wesley, 1994):
Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides.
2. Head First Design Patterns (O'Reilly, 2004): Eric Freeman, Elisabeth Robson, Bert Bates,
Kathy Sierra.
3. Pyro:
CDI Specii cations 1.1:‐spec
Search WWH ::

Custom Search