static void Main(string[] args)
        {
            // TODO Be sure to follow best practice when creating your classes

            // Create a class Animal
            // give this class 4 members that all Animals have in common


            // Create a class Bird
            // give this class 4 members that are specific to Bird
            // Set this class to inherit from your Animal Class

            // Create a class Reptile
            // give this class 4 members that are specific to Reptile
            // Set this class to inherit from your Animal Class



            /*Create an object of your Bird class
             *  give values to your members using the object of your Bird class
             *
             * Creatively display the class member values
             */

            Bird baldEagle = new Bird();

            baldEagle.Age                   = 32;
            baldEagle.CanItFly              = true;
            baldEagle.ColorOfFeathers       = "Brown and White";
            baldEagle.IsItAwesome           = true;
            baldEagle.DoesItHaveLargeTalons = true;
            baldEagle.LatinName             = "Haliaeetus leucocephalus";
            baldEagle.WingSpan              = 7;
            baldEagle.CommonName            = "Bald Eagle";

            baldEagle.PrintInfo();



            /*Create an object of your Reptile class
             *  give values to your members using the object of your Bird class
             *
             * Creatively display the class member values
             */

            Reptiles tRex = new Reptiles();

            tRex.Age            = 144324;
            tRex.NumberOfClaws  = 6;
            tRex.DetachableTail = false;
            tRex.CommonName     = "The Freaking T-REX";
            tRex.LatinName      = "Tyrannosaurus";
            tRex.Biggness       = "YUUUUGGGEE";
            tRex.IsItADinosaur  = true;

            tRex.PrintInfo();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            // TODO Be sure to follow best practice when creating your classes

            // Create a class Animal
            // give this class 4 members that all Animals have in common


            // Create a class Bird
            // give this class 4 members that are specific to Bird
            // Set this class to inherit from your Animal Class

            // Create a class Reptile
            // give this class 4 members that are specific to Reptile
            // Set this class to inherit from your Animal Class



            /*Create an object of your Bird class
             *  give values to your members using the object of your Bird class
             *
             * Creatively display the class member values
             */

            var Cardinal = new Birds();

            Cardinal.CantFly   = false;
            Cardinal.Migratory = false;
            Cardinal.IsEdible  = true;
            Cardinal.Passerene = true;

            Console.WriteLine(Cardinal.Legs);

            string chordata = null;

            Cardinal.Phylum = chordata;

            /*Create an object of your Reptile class
             *  give values to your members using the object of your Bird class
             *
             * Creatively display the class member values
             */

            var Copperhead = new Reptiles();

            Copperhead.LaysEggs = true;

            Animal Rattlesnake = new Reptiles();

            Rattlesnake.IsPoisonous = true;

            Console.WriteLine(Copperhead.Legs);

            Console.WriteLine($"A bird has {Cardinal.Legs} legs." + $"And it is {Copperhead.IsPoisonous} that is poisonous");
        }
        static void Main(string[] args)
        {
            // TODO Be sure to follow best practice when creating your classes

            // Create a class Animal-DONE
            // give this class 4 members that all Animals have in common-DONE


            // Create a class Bird -DONE
            // give this class 4 members that are specific to Bird -DONE
            // Set this class to inherit from your Animal Class -DONE

            // Create a class Reptile -DONE
            // give this class 4 members that are specific to Reptile -DONE
            // Set this class to inherit from your Animal Class -DONE



            /*Create an object of your Bird class-DONE
             *  give values to your members using the object of your Bird class-DONE
             *
             * Creatively display the class member values -DONE
             */
            var eagle = new Bird();

            eagle.Age       = 4;
            eagle.AirSpeed  = 32;
            eagle.Aquatic   = false;
            eagle.BirdSound = "FREEDOM";
            eagle.Carnivore = true;
            eagle.Flies     = true;
            eagle.Herbivore = false;
            eagle.Limbs     = 4;

            Console.WriteLine($"I have a pet eagle who is {eagle.Age} years old, flies at {eagle.AirSpeed} miles per hour, shrieking {eagle.BirdSound}");

            /*Create an object of your Reptile class -DONE
             *  give values to your members using the object of your Reptile class -DONE
             *
             * Creatively display the class member values -DONE
             */
            var komodoDragon = new Reptiles();

            komodoDragon.Age          = 18;
            komodoDragon.Carnivore    = true;
            komodoDragon.ChangesColor = false;
            komodoDragon.Herbivore    = false;
            komodoDragon.Limbs        = 4;
            komodoDragon.Regenerates  = true;
            komodoDragon.ReptileSound = "hissssss";
            komodoDragon.Venomous     = true;

            Console.WriteLine($"The Komodo Dragon is a deadly beast!  They live up to {komodoDragon.Age} years and make a ferocious {komodoDragon.ReptileSound}");
        }
Exemple #4
0
        static void Main(string[] args)
        {
            // TODO Be sure to follow best practice when creating your classes

            // DONE Create a class Animal
            // give this class 4 members that all Animals have in common


            // DONE Create a class Bird
            // give this class 4 members that are specific to Bird
            // Set this class to inherit from your Animal Class

            // DONE Create a class Reptile
            // give this class 4 members that are specific to Reptile
            // Set this class to inherit from your Animal Class



            /*Create an object of your Bird class
             *  give values to your members using the object of your Bird class
             *
             * Creatively display the class member values
             */

            Bird myBird = new Bird();

            myBird.WingColor   = "black";
            myBird.CanFly      = true;
            myBird.WillMigrate = true;
            myBird.BeakLength  = 2.7;

            ///*Create an object of your Reptile class
            //*  give values to your members using the object of your Bird class
            //* Creatively display the class member values

            var lizard = new Reptiles()
            {
                IsColdBlooded = true,
                IsScaly       = true,
                Habitat       = "swamp",
                CanGrowTail   = true,
            };

            var myAnimals = new Animal[] { myBird, lizard };

            foreach (var anamal in myAnimals)
            {
                Console.WriteLine($"Alive:{anamal.IsAlive}");
                Console.WriteLine($"Age: {anamal.Age} years old");
                Console.WriteLine($"It Has {anamal.LegCount} legs");
                Console.WriteLine($"It lives by {anamal.LandSeaAir}");
                Console.WriteLine($"");
            }
        }
Exemple #5
0
        static void Main(string[] args)
        {
            // TODO Be sure to follow best practice when creating your classes

            // Create a class Animal
            // give this class 4 members that all Animals have in common


            // Create a class Bird
            // give this class 4 members that are specific to Bird
            // Set this class to inherit from your Animal Class

            // Create a class Reptile
            // give this class 4 members that are specific to Reptile
            // Set this class to inherit from your Animal Class


            var birb = new Bird();

            birb.WingColor = "green";
            birb.Wings     = 2;
            birb.CanFly    = true;
            birb.CanBeep   = true;
            Console.WriteLine($"Hello! my bird's name is {birb.Name}.");
            Console.WriteLine($"His wings are {birb.WingColor}.");
            Console.WriteLine($"He can fly, that is {birb.CanFly}.");
            Console.WriteLine($"He beeps instead of honks, that is very {birb.CanBeep}!");
            Console.WriteLine("=============================================================================");

            /*Create an object of your Bird class
             *  give values to your members using the object of your Bird class
             *
             * Creatively display the class member values
             */
            var lizard = new Reptiles();

            lizard.Scaly   = true;
            lizard.Hostile = false;
            lizard.Diet    = "bugs";
            lizard.Habitat = "dry";
            Console.WriteLine($"My lizard's name is, {lizard.Name}.");
            Console.WriteLine($"It's {lizard.Scaly} that he is very scaly.");
            Console.WriteLine($"People think he is hostile, that is {lizard.Hostile}!");
            Console.WriteLine($"His diet consists of {lizard.Diet}.");
            Console.WriteLine($"He lives in a {lizard.Habitat} habitat.");

            /*Create an object of your Reptile class
             *  give values to your members using the object of your Bird class
             *
             * Creatively display the class member values
             */
        }
        static void Main(string[] args)
        {
            // TODO Be sure to follow best practice when creating your classes

            // DONE Create a class Animal
            // DONE give this class 4 members that all Animals have in common


            // DONE Create a class Bird
            // DONE give this class 4 members that are specific to Bird
            // DONE Set this class to inherit from your Animal Class

            // DONE Create a class Reptile
            // DONE give this class 4 members that are specific to Reptile
            // DONE Set this class to inherit from your Animal Class



            /*DONE Create an object of your Bird class
             * DONE give values to your members using the object of your Bird class
             *
             * Creatively display the class member values
             */


            var newBird = new Birds();

            {
                newBird.FeatherColor = "Blue";
                newBird.WingLength   = 22.45;
                newBird.CanFly       = false;
                newBird.ChirpNoise   = "tweet tweet";
            };


            /*Create an object of your Reptile class
             *  give values to your members using the object of your Bird class
             *
             * Creatively display the class member values
             */

            var newReptile = new Reptiles();

            {
                newReptile.HasScales   = true;
                newReptile.LegCount    = 0;
                newReptile.IsPoisonous = true;
                newReptile.TailLength  = 26.74;
            };


            var myAnimals = new Animals[] { newBird, newReptile };

            foreach (var animal in myAnimals)
            {
                Console.WriteLine($"Land, Air, or Sea?: {animal.LandAirSea}");
                Console.WriteLine($"Age: {animal.Age}");
                Console.WriteLine($"Is Dangerous?: {animal.IsDangerous}");
                Console.WriteLine($"Weight?: {animal.Weight}");
                Console.WriteLine("");
            }
        }
Exemple #7
0
        static void Main(string[] args)
        {
            // TODO Be sure to follow best practice when creating your classes

            // Create a class Animal
            // give this class 4 members that all Animals have in common


            // Create a class Bird
            // give this class 4 members that are specific to Bird
            // Set this class to inherit from your Animal Class

            // Create a class Reptile
            // give this class 4 members that are specific to Reptile
            // Set this class to inherit from your Animal Class



            /*Create an object of your Bird class
             *  give values to your members using the object of your Bird class
             *
             * Creatively display the class member values
             */
            var b1 = new Birds()
            {
                Species = "parot",
                Color   = "red",
                Sex     = "male",
                Legs    = 2,
                CanFly  = "yes",
                Wings   = 2,
                Beak    = "does have",
                LayEggs = "it does",
            };

            var lizard = new Reptiles()
            {
                Species     = "ingunana",
                Color       = "green",
                Sex         = "female",
                Legs        = 4,
                ChangeColor = "can not",
                Malt        = "it does",
                ColdBlood   = "it is",
                Posionus    = "is not"
            };


            var myAnimals = new Animals[] { b1, lizard };

            foreach (var animal in myAnimals)
            {
                Console.WriteLine($"The Animal is a {animal.Species}");
                Console.WriteLine($"The Animal is the color {animal.Color}");
                Console.WriteLine($"The Animal is a {animal.Sex}");
                Console.WriteLine($"The Animal has {animal.Legs} legs");
                Console.WriteLine("");
            }



            /*Create an object of your Reptile class
             *  give values to your members using the object of your Bird class
             *
             * Creatively display the class member values
             */
        }