public void Execute() { IAnimal animal = (T)Activator.CreateInstance(typeof(T), new object[] { _name, _age }); if (_account.CanRemoveFunds(animal.GetPrice())) { _account.RemoveFunds(animal.GetPrice()); _animals.Add(animal); } }
public void RemoveFunds(decimal amount) => Account.RemoveFunds(amount);