예제 #1
0
 public AnimalWorld(ContinentFactory factory)
 {
     _herbivorse = factory.CreateHerbivores();
     _carnivorse = factory.CreateCarnivores();
 }
예제 #2
0
 public override void Eats(Herbivorse herbivorse)
 {
     Console.WriteLine("Lion eats "+herbivorse.ToString());
 }
예제 #3
0
 public override void Eats(Herbivorse herbivorse)
 {
     Console.WriteLine(this.GetType() + " eats " + herbivorse.ToString());
 }
예제 #4
0
 public abstract void Eats(Herbivorse herbivorse);