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

            world.RunFoodChain();

            ContinentFactory america = new AmericaFactory();

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

            Console.ReadLine();
        }
Esempio n. 2
0
        /// <summary>
        /// Entry point into console application.
        /// </summary>
        public static void Main()
        {
            // Create and run the African animal world
            ContinentFactory africa = new AfricaFactory();
            AnimalWorld      world  = new AnimalWorld(africa);

            world.RunFoodChain();

            // Create and run the American animal world
            ContinentFactory america = new AmericaFactory();

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

            // Wait for user input
            Console.ReadKey();
        }
Esempio n. 3
0
        /// <summary>

        /// Entry point into console application.

        /// </summary>

        public static void Main()
        {
            // Create and run the African animal world

            ContinentFactory africa    = new AfricaFactory();
            Ecosystem        ecosystem = new Ecosystem(africa);

            ecosystem.RunFoodChain();

            // Create and run the Australia animal world

            ContinentFactory australia = new AustraliaFactory();

            ecosystem = new Ecosystem(australia);
            ecosystem.RunFoodChain();

            // Wait for user input

            Console.ReadKey();
        }