public void InvestMoney(double amount, StrategyType type)
        {
            var investment = InvestmentFactory.CreateInvestment(type, amount);

            _account.Investments.Add(investment);
            _account.ChangeBalance(-amount);
            Notify($"Investment has been made. Amount: {amount.ToString("F2")}, name: {investment.Name}");
        }
Ejemplo n.º 2
0
 public AccountBuilder AddInvestment(double amount, StrategyType type)
 {
     _account.Investments.Add(InvestmentFactory.CreateInvestment(type, amount));
     return(this);
 }