コード例 #1
0
 public string History(string type)
 {
     if (type == "Chip")
     {
         return(Chiping.History());
     }
     else if (type == "DentalCare")
     {
         return(Dental.History());
     }
     else if (type == "Fitness")
     {
         return(FitnessPr.History());
     }
     else if (type == "NailTrim")
     {
         return(NailJob.History());
     }
     else if (type == "Play")
     {
         return(Playing.History());
     }
     else
     {
         return(Vaccine.History());
     }
 }
コード例 #2
0
 public string Chip(string name, int procedureTime)
 {
     if (this.Hotel.Animals.ContainsKey(name))
     {
         Chiping.DoService(this.Hotel.Animals[name], procedureTime);
         return($"{name} had chip procedure");
     }
     else
     {
         throw new ArgumentException($"ArgumentException: Animal {name} does not exist");
     }
 }