Esempio n. 1
0
        public static void Main()
        {
            ContinentFactory africa = new AfricaFactory();
            AnimalWorld      world  = new AnimalWorld(africa);

            world.RunFoodChain();

            ContinentFactory america = new AmericaFactory();

            world = new AnimalWorld(america);
            world.RunFoodChain();

            // Wait for user input
            Console.ReadKey();
        }
Esempio n. 2
0
        public static void Main()
        {
            ContinentFactory africa = new AfricaFactory();
              AnimalWorld world = new AnimalWorld(africa);
              world.RunFoodChain();

              ContinentFactory america = new AmericaFactory();
              world = new AnimalWorld(america);
              world.RunFoodChain();

              ContinentFactory asian = new AsianFactory();
              world = new AnimalWorld(asian);
              world.RunFoodChain();

              // Wait for user input
              Console.ReadKey();
        }