Пример #1
0
        public override void DoService(IAnimal animal, int procedureTime)
        {
            animal.CheckProcedureTime(procedureTime);

            animal.Happiness -= 7;

            animal.ProcedureTime -= procedureTime;

            this.procedureHistory.Add(animal);
        }
        public override void DoService(IAnimal animal, int procedureTime)
        {
            animal.CheckProcedureTime(procedureTime);

            animal.Energy      -= 8;
            animal.IsVaccinated = true;

            animal.ProcedureTime -= procedureTime;

            this.procedureHistory.Add(animal);
        }
Пример #3
0
        public override void DoService(IAnimal animal, int procedureTime)
        {
            animal.CheckProcedureTime(procedureTime);

            if (animal.IsChipped)
            {
                throw new ArgumentException($"{animal.Name} is already chipped");
            }

            animal.Happiness -= 5;
            animal.IsChipped  = true;

            animal.ProcedureTime -= procedureTime;

            this.procedureHistory.Add(animal);
        }