public static void RunSheep() { Sheep sheep = new Sheep("Blackie"); CountUtil.Count(sheep, 2); Console.WriteLine("Now, let us clone Blackie!"); Sheep clone = sheep.Clone() as Sheep; string cloneName = Validation.GetName("\nVhat vould you like to name the clone? "); clone.Name = cloneName; clone.ResetCount(); int userNumber = Validation.GetNumber($"\nHow many times vould you like to count {cloneName}? "); CountUtil.Count(clone, userNumber); sheep.ResetCount(); CountUtil.Count(sheep, 1); }
public static void RunTest(ICountable c, int MaxCount, string newName) { ((Sheep)c).Name = newName; CountUtil.Count(c, MaxCount); }
public static void RunAlligator() { Alligator alligator = new Alligator("alligator"); CountUtil.Count(alligator, 3); }
public static void RunTest(ICountable c, int MaxCount) { CountUtil.Count(c, MaxCount); }