static void Main(string[] args) { // creating an instance(OBJECT) of each animal class Ants ant = new Ants(); BettaFish betta = new BettaFish { MaximumDepth = 50 }; CopperheadSnakes coppersnake = new CopperheadSnakes(); Earthworms earthworm = new Earthworms(); Finches finch = new Finches(); Gerbils gerbil = new Gerbils(); Mice mice = new Mice(); Parakeets parakeet = new Parakeets(); Terrapins terrapin = new Terrapins { MaximumDepth = 50 }; TimberRattlesnakes timbersnake = new TimberRattlesnakes(); // add the animals to thier corresponding container Diggers diggersContainer = new Diggers(); diggersContainer.diggers.Add(ant); diggersContainer.diggers.Add(earthworm); Swimmers swimmersContainer = new Swimmers(); swimmersContainer.swimmers.Add(betta); swimmersContainer.swimmers.Add(terrapin); Fliers fliersContainer = new Fliers(); fliersContainer.fliers.Add(parakeet); fliersContainer.fliers.Add(finch); AboveGround aboveGroundContainer = new AboveGround(); aboveGroundContainer.grounders.Add(coppersnake); aboveGroundContainer.grounders.Add(gerbil); aboveGroundContainer.grounders.Add(mice); aboveGroundContainer.grounders.Add(timbersnake); }
static void Main(string[] args) { Cage cageforbirds = new Cage(); Cardboardbox animalbox = new Cardboardbox(); SmallerBox smallBox = new SmallerBox(); Tank waterAnmimals = new Tank(); Ant fredandGeorge = new Ant() { marching = "one by one hurah", walking = "hey, Im walking here", digging = "dig faster for our queen", }; smallBox.smallerbox.Add(fredandGeorge); Betta fishheads = new Betta() { blerb = "blerb, blerb", swimming = "hey, Im swimming here" }; waterAnmimals.tank.Add(fishheads); Copperhead snakey = new Copperhead { coperheadssssssss = "snake jazz", walking = "Idont", digging = "not exactly sure how digging works for me" }; animalbox.box.Add(snakey); Earthworm Jim = new Earthworm() { earthwormJim = "cow tipper", digging = "tunnel time" }; smallBox.smallerbox.Add(Jim); Finch flappyBird = new Finch() { squak = "squak", flying = "flying better than the parakeet" }; cageforbirds.cage.Add(flappyBird); Gerbil herbTheGerb = new Gerbil() { gerbilstuff = "Ima Gerbil", walking = "likeaBOSS!!!" }; animalbox.box.Add(herbTheGerb); Mice mickey = new Mice() { squeak = "squeeeeeeeek", walking = "scattering all across the floor" }; animalbox.box.Add(mickey); Parakeet tweety = new Parakeet() { tweet = "tweet, tweet", flying = "screw flappy bird" }; cageforbirds.cage.Add(tweety); Rattlesnake tailShaker = new Rattlesnake() { ssssssss = "sssssnake jazzzzzz", walking = "slither", digging = "I use a shovel" }; animalbox.box.Add(tailShaker); Terrapin shelly = new Terrapin() { turtlestuff = "slow and steady", swimming = "blerbadubbadubdub", walking = "one foot in front of the other", digging = "in the sand hopefully" }; waterAnmimals.tank.Add(shelly); Console.WriteLine(); }
static void Main(string[] args) { Parakeets myParakeet = new Parakeets() { Species = "Budgerigar", Name = "Sqawkey", Color = "lime green", Food = "Fruit and Nuts", Flier = true }; Earthworms myEarthworm = new Earthworms() { Species = "Common Earthworm", Name = "Wormy", Color = "tan", Food = "Dirt", Digger = true }; Terrapins myTerrapin = new Terrapins() { Species = "Southern River Terrapin", Name = "Steve", Color = "Black", Food = "Algae", Swimmer = true, Crawler = true }; Rattlesnake myRattlesnake = new Rattlesnake() { Species = "Diamondback Rattlesnake", Name = "Bitey", Color = "Brown", Food = "Mice", Crawler = true }; Mice myMouse = new Mice() { Species = "Deer Mouse", Name = "Mr. Wiggles", Color = "Tan", Food = "Seed and Nuts", Digger = true, Crawler = true }; Ants myAnt = new Ants() { Species = "Black Garden Ant", Name = "Sgt. Stiggs", Color = "Black", Food = "Crumbs", Crawler = true, Digger = true }; Finches myFinch = new Finches() { Species = "Common Cactus Finch", Name = "Gertrude", Color = "Black", Food = "Worms", Flier = true }; BetaFish myBetaFish = new BetaFish() { Species = "Combtail Betta", Name = "Willis", Color = "Blue and Purple", Food = "Fish Flakes", Swimmer = true }; Copperhead myCopperhead = new Copperhead() { Species = "Australian Copperhead", Name = "Greg", Color = "Grey and Brown", Food = "Mice", Crawler = true, Swimmer = true }; Gerbils myGerbil = new Gerbils() { Species = "Fat-Tailed Gerbil", Name = "Tan", Color = "Bill", Food = "Seeds and Nuts", Digger = true, Crawler = true }; }