Exemple #1
0
        static void Main(string[] args)
        {
            Duck robotDuck = new RobotDuck();

            robotDuck.Fly();
            robotDuck.Quack();

            Duck normalDuck = new NormalDuck();

            normalDuck.Fly();
            normalDuck.Quack();

            Duck modelDuck = new ModelDuck(new NoFlyStrategy(), new HighPitchQuackStrategy());

            modelDuck.Fly();
            modelDuck.Quack();

            Console.ReadLine();
        }