Пример #1
0
 public MallardDuck(QuackBehavior quackBehaviorIn, FlyBehavior flyBehaviorIn)
 {
     quackBehavior = quackBehaviorIn;
     flyBehavior   = flyBehaviorIn;
 }
Пример #2
0
 public MallardDuck()
 {
     FlyBehavior   = new FlyWithWingsBehavior();
     QuackBehavior = new QuackBehavior();
 }
Пример #3
0
 public void setQuackBehavior(QuackBehavior qb)
 {
     quackBehavior = qb;
 }
Пример #4
0
 public void PerformQuack()
 {
     QuackBehavior.Quacking();
 }
Пример #5
0
 public MallardDuck()
 {
     FlyBehavior = new FlyWithWingsBehavior();
     QuackBehavior = new QuackBehavior();
 }
Пример #6
0
 public ModelDuck(QuackBehavior quackBehaviorIn, FlyBehavior flyBehaviorIn)
 {
     flyBehavior   = flyBehaviorIn;
     quackBehavior = quackBehaviorIn;
 }
Пример #7
0
 public void SetQuackBehavior(QuackBehavior quackBehavior)
 {
     this.quackBehavior = quackBehavior;
 }