예제 #1
0
파일: Program.cs 프로젝트: egoshin-igor/OOD
        static void Main(string[] args)
        {
            SimulateDuck(new MallardDuck());
            SimulateDuck(new RedHeadDuck());
            SimulateDuck(new RubberDuck());
            SimulateDuck(new DecoyDuck());
            SimulateDuck(new ModelDuck());

            Duck duck = new MallardDuck();

            duck.Fly();
            duck.Fly();
            duck.SetFlight(FlyBehaviour.FlyWithWings());
            duck.Fly();
        }