Saturday, October 6, 2007

Strategy pattern (2)

6) Designing the Duck Behaviors
We will use an interface to represent each behavior - IFlyBehavior and IQuackBehavior, and then We'll make a set of classes whose entire reason for living is to represent a behavior, e.g. FlyWithWings and FlyNoWay will implement the IFlyBehavior interface.


The following posts will show you all the code necessary to demo our pattern.


blog comments powered by Disqus