What do YOU think about this design?
- 1. Intro to Design Patterns: Welcome to Design Patterns
- from Head First Design Patterns
- Publisher: O'Reilly Media, Inc.
- Released: October 2004
I feel you can still handle it by adding a few intermediate classes if there is only one behavior to change. However, if there are more, the combination would be a nightmare to maintain. Consider one subclass for each fly+quack combination. You are doing strategy in a hard way.
Share this highlighthttp://www.safaribooksonline.com/a/head-first-design/67899/