Example #1
0
 public override void Eat(Herbivor h)
 {
     Console.WriteLine(this.GetType().Name + " eats " + h.GetType().Name);
 }
Example #2
0
 public AnimalWorld(ContinentFactory factory)
 {
     _carnivore = factory.CreateCarnivore();
     _herbivor  = factory.CreateHerbivore();
 }
Example #3
0
 public AnimalWorld(ContinentFactory factory)
 {
     _carnivore = factory.CreateCarnivore();
     _herbivor = factory.CreateHerbivore();
 }
Example #4
0
 public override void Eat(Herbivor h)
 {
     Console.WriteLine(this.GetType().Name + " eats " + h.GetType().Name);
 }
Example #5
0
 public abstract void Eat(Herbivor h);
Example #6
0
 public abstract void Eat(Herbivor h);