Example #1
0
        static void Main(string[] args)
        {
            var clinicProcessor = new ClinicProcessor();
            var n = int.Parse(Console.ReadLine());

            for (int i = 0; i < n; i++)
            {
                try
                {
                    var tokens  = Console.ReadLine().Split().ToArray();
                    var command = tokens[0];
                    tokens = tokens.Skip(1).ToArray();
                    ImplementCommand(clinicProcessor, tokens, command);
                }
                catch (ArgumentException err)
                {
                    Console.WriteLine(err.Message);
                }
            }
        }
Example #2
0
 private static void ImplementCommand(ClinicProcessor clinicProcessor, string[] tokens, string command)
 {
     switch (command)
     {
     case "Create" when tokens[0] == "Pet":