示例#1
0
 public MallardDuck()
 {
     quackBehavior = new SimpleQuack();
     flyBehavior   = new FlyWithWings();
 }
示例#2
0
 public ModelDuck()
 {
     flyBehavior   = new FlyNoWay();
     quackBehavior = new SimpleQuack();
 }