Example #1
0
 /// <summary>
 /// Constructor. Like a Bird constructor, but with an additional swimSpeed.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="gender"></param>
 /// <param name="age"></param>
 /// <param name="wingSpan">in cm</param>
 /// <param name="swimSpeed">in knots</param>
 public Penguin(string name, Gender gender, int age, double wingSpan, double swimSpeed) : base(name, gender, age, wingSpan)
 {
     SwimSpeed    = swimSpeed;
     FoodSchedule = new FoodSchedule(new List <string>()
     {
         "Fisk till frukost", "fisk till lunch"
     });
 }
Example #2
0
        //private EaterType

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="name"></param>
        /// <param name="gender"></param>
        /// <param name="age"></param>
        /// <param name="wingSpan"></param>
        /// <param name="flightSpeed">in km/h</param>
        public Eagle(string name, Gender gender, int age, double wingSpan, double flightSpeed) : base(name, gender, age, wingSpan)
        {
            FlightSpeed  = flightSpeed;
            FoodSchedule = new FoodSchedule(new List <string>()
            {
                "Sork till frukost", "Kattunge till lunch"
            });
        }
Example #3
0
 /// <summary>
 /// Constructs a gnu.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="gender"></param>
 /// <param name="age">in years.</param>
 /// <param name="toothCount"></param>
 /// <param name="tonsEaten"> the amount of grass this gnu has eaten.</param>
 public Gnu(string name, Gender gender, int age, int toothCount, int tonsEaten) : base(name, gender, age, toothCount)
 {
     TonsEaten    = tonsEaten;
     FoodSchedule = new FoodSchedule(new List <string>()
     {
         "Gräs till frukost", "Gräs till lunch"
     });
 }
Example #4
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="name"></param>
 /// <param name="gender"></param>
 /// <param name="age"></param>
 /// <param name="toothCount">The number of teeth this bear has.</param>
 /// <param name="blueBerriesEaten">The number of blueberries this bear has eatin so far.</param>
 public Bear(string name, Gender gender, int age, int toothCount, int blueBerriesEaten) :
     base(name, gender, age, toothCount)
 {
     BlueBerriesEaten = blueBerriesEaten;
     FoodSchedule     = new FoodSchedule(new List <string>()
     {
         "Blåbär till frukost", "Älg till lunch"
     });
 }