public double Calculo(Conta conta, Investimento perfilInvestimento) { double valorInvestimento = perfilInvestimento.Calculo(conta); MessageBox.Show("Investimento: " + valorInvestimento); valorInvestimento -= perfilInvestimento.CalculaImposto(valorInvestimento); MessageBox.Show("Investimento sem imposto: " + valorInvestimento); conta.Deposita(valorInvestimento); return(conta.Saldo); }
public void Notificar(Investimento investimento) { Console.WriteLine("Notificando {0} que {1} " + "teve preço alterado para {2:C}", Nome, investimento.Simbolo, investimento.Valor); }
public void RealizarInvestimento(Conta conta, Investimento investimento) { double resultado = investimento.CalcularInvestimento(conta); Console.WriteLine("INVESTIMENTO = " + resultado); }
public void Investe(Conta conta, Investimento investimento) { double retornoInvestimento = investimento.RealizaInvestimento(conta); conta.Saldo = retornoInvestimento * 0.75; }