Exemplo n.º 1
0
 /// <summary>
 /// Copy constructor
 /// </summary>
 /// <param name="other"></param>
 protected Animal(Animal other)
 {
     animalID        = other.animalID;
     name            = other.name;
     ageInt          = other.ageInt;
     gender          = other.gender;
     foodScheduleObj = other.foodScheduleObj;
 }
Exemplo n.º 2
0
 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="animalID"></param>
 /// <param name="name"></param>
 /// <param name="ageInt"></param>
 /// <param name="gender"></param>
 /// <param name="noOfTeeth"></param>
 /// <param name="colour"></param>
 public Cat(int animalID, string name, int ageInt, string gender, string noOfTeeth, string colour)
     : base(animalID, name, ageInt, gender, noOfTeeth)
 {
     this.colour     = colour;
     foodScheduleObj = new FoodSchedule(new List <string>()
     {
         "Morning: Cat food", "Midday: Mouse", "Evening: Milk"
     });
     //create food schedule object and fill with items specific for this animal
 }
Exemplo n.º 3
0
 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="name"></param>
 /// <param name="ageInt"></param>
 /// <param name="gender"></param>
 /// <param name="noOfTeeth"></param>
 /// <param name="breed"></param>
 public Dog(string name, int ageInt, string gender, string noOfTeeth, string breed)
     : base(name, ageInt, gender, noOfTeeth)
 {
     this.breed      = breed;
     foodScheduleObj = new FoodSchedule(new List <string>()
     {
         "Morning: bones", "Midday: Dog food", "Evening: Sweets"
     });
     //create food schedule object and fill with items specific for this animal
 }
Exemplo n.º 4
0
 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="name"></param>
 /// <param name="ageInt"></param>
 /// <param name="gender"></param>
 /// <param name="wingSpan"></param>
 /// <param name="flyingSpeed"></param>
 public Falcon(string name, int ageInt, string gender, string wingSpan, string flyingSpeed)
     : base(name, ageInt, gender, wingSpan)
 {
     this.flyingSpeed = flyingSpeed;
     foodScheduleObj  = new FoodSchedule(new List <string>()
     {
         "Morning: Rabbit"
     });
     //create food schedule object and fill with items specific for this animal
 }
Exemplo n.º 5
0
 /// <summary>
 /// constructor
 /// </summary>
 /// <param name="name"></param>
 /// <param name="ageInt"></param>
 /// <param name="gender"></param>
 /// <param name="wingSpan"></param>
 /// <param name="colour"></param>
 public Parrot(string name, int ageInt, string gender, string wingSpan, string colour)
     : base(name, ageInt, gender, wingSpan)
 {
     this.colour     = colour;
     foodScheduleObj = new FoodSchedule(new List <string>()
     {
         "Morning: Refill bird feeder"
     });
     //create food schedule object and fill with items specific for this animal
 }