Exemple #1
0
 public bool Equals(Lion lion)
 {
     if (this.Weight == lion.Weight &&
         this.Male == lion.Male)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemple #2
0
        static void Main(string[] args)
        {
            Cat cat = new Cat(false);

            cat.CatchPray(null);

            Cat lion = new Lion(true, 80);

            lion.CatchPray(null);

            AfricanLion africanLion = new AfricanLion(true, 120);

            africanLion.CatchPray(null);
        }