static void Main(string[] args)
        {
            var parakeet1   = new Parakeets();
            var earthworm1  = new Earthworms();
            var terrapin1   = new Terrapins();
            var timber1     = new TimberRattlesnake();
            var mice        = new Mice();
            var ant1        = new Ants();
            var finch1      = new Finches();
            var bettaFish1  = new BettaFish();
            var copperhead1 = new CopperheadSnake();
            var gerbil1     = new Gerbils();

            DigContainer digContainer = new DigContainer();

            digContainer.diggingAnimals.Add(earthworm1);

            SwimContainer swimContainer = new SwimContainer();

            swimContainer.swimmingAnimals.Add(terrapin1);
            swimContainer.swimmingAnimals.Add(bettaFish1);

            FlyContainer flyContainer = new FlyContainer();

            flyContainer.flyingAnimals.Add(parakeet1);
            flyContainer.flyingAnimals.Add(finch1);

            WalkContainer walkContainer = new WalkContainer();

            walkContainer.walkingAnimals.Add(timber1);
            walkContainer.walkingAnimals.Add(ant1);
            walkContainer.walkingAnimals.Add(mice);
            walkContainer.walkingAnimals.Add(gerbil1);
            walkContainer.walkingAnimals.Add(copperhead1);
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Welcome to the zoo apparently.");

            Ants antony = new Ants()
            {
                livesOnLand = true
            };
            BettaFishes betta = new BettaFishes()
            {
                livesInWater = true
            };
            CopperheadSnakes copper = new CopperheadSnakes()
            {
                livesOnLand = true
            };
            Earthworms wormy = new Earthworms()
            {
                livesOnLand = true
            };
            Finches finn = new Finches()
            {
                livesInAir = true
            };
            Gerbils gerald = new Gerbils()
            {
                livesOnLand = true
            };
            Mice mickey = new Mice()
            {
                livesOnLand = true
            };
            Parakeets peepers = new Parakeets()
            {
                livesInAir = true
            };
            Terrapins backItUpTerry = new Terrapins()
            {
                livesOnLand = true
            };
            TimberRattleSnakes rattler = new TimberRattleSnakes()
            {
                livesOnLand = true
            };


            Box      boxContainer      = new Box();
            SmallBox smallBoxContainer = new SmallBox();
            Cage     cageContainer     = new Cage();
            Tank     tankContainer     = new Tank();

            smallBoxContainer.Walkers.Add(antony);
            tankContainer.Swimming.Add(betta);
            boxContainer.Slithers.Add(copper);
            boxContainer.Slithers.Add(wormy);
            cageContainer.Fliers.Add(finn);
            smallBoxContainer.Walkers.Add(gerald);
            smallBoxContainer.Walkers.Add(mickey);
            cageContainer.Fliers.Add(peepers);
            tankContainer.Swimming.Add(backItUpTerry);
            boxContainer.Slithers.Add(rattler);
        }