public MallardDuck()
 {
     QuackBehavior = new QuackSound();
     FlyBehavior = new FlyWithWings();
 }
示例#2
0
 public ModelDuck()
 {
     flyBehavior = new FlyWithWings();
     quackBehavior = new LoudQuack();
 }
示例#3
0
 public NormalDuck()
 {
     flyBehaviour   = new FlyWithWings();
     quackBehaviour = new NormalQuack();
 }
示例#4
0
 public MallardDuck()
 {
     QuackBehavior = new Quack();
     FlyBehavior   = new FlyWithWings();
 }
 public MallardDuck()
 {
     quackBehavior = new SoundQuack();
     flyBehavior   = new FlyWithWings();
 }
示例#6
0
 public Duck()
 {
     FlyBehavior      = new FlyWithWings();
     VocalizeBehavior = new Chirp();
 }