示例#1
0
 /// <summary>
 /// Reports a successful meal
 /// </summary>
 /// <param name="critter"> the critter that will be eaten </param>
 /// <returns> confirmation of meal </returns>
 public override bool Eat(IAmDinner critter)
 {
     Console.WriteLine($"I am a bear, and I ate a {critter.Species}. It was tasty.");
     return(true);
 }
示例#2
0
 /// <summary>
 /// Reports a successful meal
 /// </summary>
 /// <param name="critter"> the critter that will be eaten </param>
 /// <returns> confirmation of meal </returns>
 public override bool Eat(IAmDinner critter)
 {
     Console.WriteLine($"Squeak squeak... SQUEAK! Mmmmm.... {critter.Species}.");
     return(true);
 }
示例#3
0
 /// <summary>
 /// Reports a successful meal
 /// </summary>
 /// <param name="critter"> the critter that will be eaten </param>
 /// <returns> confirmation of meal </returns>
 public override bool Eat(IAmDinner critter)
 {
     Console.WriteLine($"I am a lion, and  I eat all the things. Today I ate a {critter.Species}.");
     return(true);
 }
示例#4
0
 /// <summary>
 /// Reports a successful meal
 /// </summary>
 /// <param name="critter"> the critter that will be eaten </param>
 /// <returns> confirmation of meal </returns>
 public override bool Eat(IAmDinner critter)
 {
     Console.WriteLine($"Weasel find yummy {critter.Species} and eat it.");
     return(true);
 }
示例#5
0
 /// <summary>
 /// Reports a successful meal
 /// </summary>
 /// <param name="critter"> the critter that will be eaten </param>
 /// <returns> confirmation of meal </returns>
 public override bool Eat(IAmDinner critter)
 {
     Console.WriteLine($"I am orca, and I play with my food. Today's toy is a {critter.Species}. Weeeeee! Yummmmm.");
     return(true);
 }
示例#6
0
 /// <summary>
 /// Reports instance's untimely demise to the console
 /// </summary>
 public override bool Eat(IAmDinner critter)
 {
     Console.WriteLine($"This wolf ate a yummy {critter.Species}.");
     return(true);
 }
示例#7
0
 /// <summary>
 /// Reports a successful meal
 /// </summary>
 /// <param name="critter"> the critter that will be eaten </param>
 /// <returns> confirmation of meal </returns>
 public override bool Eat(IAmDinner critter)
 {
     Console.WriteLine($"I narwhal. I eats the {critter.Species} after I skewers it with my horn.");
     return(true);
 }
示例#8
0
 /// <summary>
 /// Implementation of IEat interface
 /// Requires children to define their eating habits
 /// </summary>
 /// <param name="critter"> critter to be eaten </param>
 /// <returns> confirmation of meal </returns>
 public abstract bool Eat(IAmDinner critter);