public AnimalCentre() { this.hotel = new Hotel(); this.animalFactory = new AnimalFactory(); this.chipped = new Chip(); this.dentalCared = new DentalCare(); this.fitnessed = new Fitness(); this.nailTrimmed = new NailTrim(); this.played = new Play(); this.vaccineted = new Vaccinate(); }
public AnimalCentre() { this.animalFactory = new AnimalFactory(); this.hotel = new Hotel(); this.chip = new Chip(); this.fitness = new Fitness(); this.play = new Play(); this.nailTrim = new NailTrim(); this.dentalCare = new DentalCare(); this.vaccinate = new Vaccinate(); this.adoptedAnimals = new Dictionary <string, List <string> >(); }
public AnimalCentre() { this.hotel = new Hotel(); this.animalFactory = new AnimalFactory(); this.proceduresAndItsAnimals = new Dictionary <string, List <IAnimal> >() { ["Chip"] = new List <IAnimal>(), ["Vaccinate"] = new List <IAnimal>(), ["Fitness"] = new List <IAnimal>(), ["Play"] = new List <IAnimal>(), ["DentalCare"] = new List <IAnimal>(), ["NailTrim"] = new List <IAnimal>(), }; }
public AnimalCentre() { this.hotel = new Hotel(); this.procedures = new Dictionary <string, IProcedure> { { "Chip", new Chip() }, { "DentalCare", new DentalCare() }, { "NailTrim", new NailTrim() }, { "Fitness", new Fitness() }, { "Play", new Play() }, { "Vaccinate", new Vaccinate() } }; this.ownersAndPets = new Dictionary <string, SortedSet <string> >(); this.animalFactory = new AnimalFactory(); }
public string RegisterAnimal(string type, string name, int energy, int happiness, int procedureTime) { AnimalFactory animalFactory = new AnimalFactory(); Animal animal = animalFactory.CreateAnimal(type, name, energy, happiness, procedureTime); if (Hotel.Capacity == hotel.Animals.Count) { throw new InvalidOperationException("Not enough capacity"); } if (hotel.Animals.ContainsKey(animal.Name)) { throw new ArgumentException($"Animal {animal.Name} already exist"); } hotel.Accommodate(animal); return($"Animal {animal.Name} registered successfully"); }
public void Setup() { this.hotel = new Hotel(); this.animalFactory = new AnimalFactory(); this.chipProcedure = new Chip(); this.vaccinationProcedure = new Vaccinate(); this.fitnessProcedure = new Fitness(); this.playProcedure = new Play(); this.dentalProcedure = new DentalCare(); this.nailProcedure = new NailTrim(); this.proceduresConducted = new Dictionary <string, List <IAnimal> >(); this.adoptedAnimals = new Dictionary <string, List <IAnimal> >(); proceduresConducted.Add("Chip", new List <IAnimal>()); proceduresConducted.Add("Vaccinate", new List <IAnimal>()); proceduresConducted.Add("Fitness", new List <IAnimal>()); proceduresConducted.Add("Play", new List <IAnimal>()); proceduresConducted.Add("DentalCare", new List <IAnimal>()); proceduresConducted.Add("NailTrim", new List <IAnimal>()); }