public void CreatePet(string[] args) { string name = args[2]; int age = int.Parse(args[3]); string kind = args[4]; Pet pet = petFactory.Create(name, age, kind); pets.Add(pet); }
static void Main() { IPet cat = PetFactory.Create("cat"); cat.Show(); }