Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            var myAnt = new Ant()
            {
                Name  = "My Ant",
                Color = "Red"
            };

            var myCopperhead = new Copperhead()
            {
                Name  = "Snek",
                Color = "Mysterious"
            };

            var myWorm = new Earthworm()
            {
                Name  = "Wormy",
                Color = "Pink"
            };

            var myFinch = new Finch()
            {
                Name  = "Birdy",
                Color = "Bird Color"
            };

            var myFish = new Fish()
            {
                Name  = "Fishy",
                Color = "Briny deep"
            };

            var myGerbil = new Gerbil()
            {
                Name  = "Hamtaro",
                Color = "Who Cares"
            };

            var myMouse = new Mouse()
            {
                Name  = "Jerry",
                Color = "White"
            };

            var myParakeet = new Parakeet()
            {
                Name  = "The Fruit Loops One",
                Color = "Blue"
            };

            var myRattlesnake = new Rattlesnake()
            {
                Name  = "Rattle",
                Color = "Snake"
            };

            var myTerrapin = new Terrapin()
            {
                Name  = "Franklin",
                Color = "Green"
            };

            var SwimmersContainer = new SwimmersContainer();

            SwimmersContainer.AddSwimmers(myTerrapin);
            SwimmersContainer.AddSwimmers(myFish);

            var WalkersContainer = new WalkersContainer();

            WalkersContainer.AddWalker(myAnt);
            WalkersContainer.AddWalker(myCopperhead);
            WalkersContainer.AddWalker(myGerbil);
            WalkersContainer.AddWalker(myMouse);
            WalkersContainer.AddWalker(myRattlesnake);
            WalkersContainer.AddWalker(myTerrapin);

            var DiggersContainer = new DiggersContainer();

            DiggersContainer.AddDigger(myAnt);
            DiggersContainer.AddDigger(myWorm);
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Ant ant = new Ant();

            ant.WillWalkOnGround = true;
            ant.LegCount         = 2;

            BettaFish bettafish = new BettaFish();

            bettafish.WillSwim = true;
            bettafish.IsCute   = true;

            CopperheadSnake copperheadsnake = new CopperheadSnake();

            copperheadsnake.WillWalkOnGround = true;
            copperheadsnake.Size             = "2";

            Earthworm earthworm = new Earthworm();

            earthworm.WillDig      = true;
            earthworm.SizeInInches = 2;

            Finche finche = new Finche();

            finche.WillFly  = true;
            finche.LastName = "bob";

            Gerbil gerbil = new Gerbil();

            gerbil.WillWalkOnGround = true;
            gerbil.FluffLevel       = "extreme";

            Mice mice = new Mice();

            mice.WillWalkOnGround = true;
            mice.CuteLevel        = "big time";

            Parakeet parakeet = new Parakeet();

            parakeet.WillFly       = true;
            parakeet.NumberOfWings = 5;

            Terrapin terrapin = new Terrapin();

            terrapin.WillWalkOnGround = true;
            terrapin.Name             = "steve";

            TimberRattlesnake timberrattlesnake = new TimberRattlesnake();

            timberrattlesnake.WillWalkOnGround = true;
            timberrattlesnake.Color            = "green? ";

            ///////////////////////////////////Containers
            FlyContainer flycontainer = new FlyContainer();

            flycontainer.FlyBox.Add(parakeet);
            flycontainer.FlyBox.Add(finche);

            SwimContainer swimcontainer = new SwimContainer();

            swimcontainer.SwimBox.Add(bettafish);

            DigContainer digcontainer = new DigContainer();

            digcontainer.DigBox.Add(earthworm);

            WalkContainer walkcontainer = new WalkContainer();

            walkcontainer.WalkBox.Add(timberrattlesnake);
            walkcontainer.WalkBox.Add(terrapin);
            walkcontainer.WalkBox.Add(mice);
            walkcontainer.WalkBox.Add(gerbil);
            walkcontainer.WalkBox.Add(copperheadsnake);
            walkcontainer.WalkBox.Add(ant);
        }