Пример #1
0
 public Animal()
 {
     //initializing the private fields
     _name   = "default-animal";
     _age    = 5;
     _gender = GenderTYPE.UNKNOWN;
     //printing to the screen that the Animal class has been initialized.
     Utilities.LogIt("This is to confirm that the Animal class has been initialized.\n");
 }//end of Animal constructor
Пример #2
0
        //{
        //    Console.WriteLine("Our animal is eating " + food +
        //        " with " + how + " to survive.\n");
        //}
        #endregion

        #region Other Methods...
        //Play Method | Simply printing out to the screen that the animal is playing
        public void Reproduce()
        {
            //printing a saying to the screen
            Utilities.LogIt("The animal is reproducing.\n");
            _gender = GenderTYPE.FEMALE;
        }