Exemple #1
0
 private void botaoTributavel_Click(object sender, EventArgs e)
 {
     GerenciadorDeImposto gerenciador = new GerenciadorDeImposto();
     ContaPoupanca cp = new ContaPoupanca();
     cp.Deposita(200);
     SeguroDeVida sv = new SeguroDeVida();
     gerenciador.Adiciona(cp);
     gerenciador.Adiciona(sv);
     MessageBox.Show("Total: " + gerenciador.Total);
 }
Exemple #2
0
        private void button11_Click(object sender, EventArgs e)
        {
            button8_Click(sender, e);

            GerenciadorDeImposto tt = new GerenciadorDeImposto();

            foreach (Conta conta in banco.Contas)
            {
                if (conta is ITributavel)
                {
                    tt.Acumula((ITributavel)conta);
                }
            }
            tt.Acumula(new SeguroDeVida());
            MessageBox.Show("Total de tributos calculado: " + tt.Total);
        }
Exemple #3
0
 private void botaoTributavel_Click(object sender, EventArgs e)
 {
     GerenciadorDeImposto gerenciador = new GerenciadorDeImposto();
     ContaPoupanca cp = new ContaPoupanca();
     cp.Deposita(200);
     SeguroDeVida sv = new SeguroDeVida();
     gerenciador.Adiciona(cp);
     gerenciador.Adiciona(sv);
     MessageBox.Show("Total: " + gerenciador.Total);
 }