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