コード例 #1
0
 public MallardDuck()
 {
     FlyBehavior   = new FlyWithWingsBehavior();
     QuackBehavior = new QuackBehavior();
 }
コード例 #2
0
 public RedheadDuck() : base()
 {
     FlyBehavior   = new FlyWithWingsBehavior();
     QuackBehavior = new QuackBehavior();
 }