public RubberDuck()
 {
     quackBehavior = new Squeak();
     flyBehavior = new FlyNoWay();
 }
 public ModelDuck()
 {
     flyBehavior = new FlyNoWay();
     quackBehavior = new Quack();
 }
示例#3
0
 public RubberDuck()
 {
     quackBehavior = new Squeak();
     flyBehavior   = new FlyNoWay();
 }
 public DecoyDuck()
 {
     quackBehavior = new MuteQuack();
     flyBehavior = new FlyNoWay();
 }
示例#5
0
 public DecoyDuck()
 {
     quackBehavior = new MuteQuack();
     flyBehavior   = new FlyNoWay();
 }