Пример #1
0
 public MallardDuck()
 {
     FlyBehavior   = new NaturalFly();
     QuackBehavior = new QuackSound();
 }
Пример #2
0
 /// <summary>
 /// Constructor to the base duck class. Maybe it shouldn't be initialized to the standard duck.
 /// </summary>
 protected DuckClass()
 {
     // Default to the normal duck behavior.
     FlyBehavior   = new NaturalFly();
     QuackBehavior = new QuackSound();
 }