Beispiel #1
0
        static void Main(string[] args)
        {
            Animal dog = new Animal();

            dog.eat();
            dog.drink();

            Console.WriteLine("{0}\n{1}\n", dog.hunger, dog.thirst);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            Animal horse = new Animal();

            horse.drink();
            Animal cat = new Animal(50, 50);

            cat.drink();
            cat.play();
            horse.GetValues();
            cat.GetValues();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            Animal Duck = new Animal();

            Duck.drink();
            Duck.eat();
            Duck.play();



            Console.ReadLine();
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            /*Animal
             * Create an Animal class
             * Every animal has a hunger value, which is a whole number
             * Every animal has a thirst value, which is a whole number
             * when creating a new animal object these values are created with the default 50 value
             * Every animal can eat() which decreases their hunger by one
             * Every animal can drink() which decreases their thirst by one
             * Every animal can play() which increases both by one*/

            Animal Monkey = new Animal();

            Monkey.drink();
            Monkey.eat();
            Monkey.play();


            Console.ReadLine();
        }