Decorator Pattern
This pattern is really a good choice to extend behavior without the drawbacks of inheritance. The example given in the Heads First Design Patterns is of a Coffee Shop, on how to design a flexible beverage selling system.
This pattern is really a good choice to extend behavior without the drawbacks of inheritance. The example given in the Heads First Design Patterns is of a Coffee Shop, on how to design a flexible beverage selling system.