コード例 #1
0
        static void Main(string[] args)
        {
            Conta c = new Conta(12131, "Bruno Vernay", 1250.50);

            Console.WriteLine(c.Saldo.ToString());
            c.Deposito(1000);
            Console.WriteLine(c.Saldo.ToString());
            c.Retirada(1000);
            Console.WriteLine(c.Saldo.ToString());

            ContaEmpresarial ce = new ContaEmpresarial(12131, "Bruno Vernay", 5000.0, 1000);

            Console.WriteLine(ce.Saldo.ToString());
            ce.Deposito(1000);
            Console.WriteLine(ce.Saldo.ToString());
            ce.Retirada(1000);
            Console.WriteLine(ce.Saldo.ToString());
            ce.LimiteEmprestimo = 1000;
            ce.Emprestimo(2000);
            Console.WriteLine(ce.Saldo.ToString());
            ce.Emprestimo(500);
            Console.WriteLine(ce.Saldo.ToString());
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: luferIPCA/2020-20201-LP2
        static void Main(string[] args)
        {
            Conta c1 = new Conta();

            c1.num          = 1;
            c1.titular.nome = "ola";
            //c1.tipo = TIPOCONTA.CC;
            c1.saldo = 1000;


            c1.Deposito(300);
            c1.Levantamento(150);

            Conta c2 = new Conta();

            c2.num          = 2;
            c2.titular.nome = "ole";
            //c2.tipo = TIPOCONTA.CP;
            c2.saldo = 1000;
            c2.Deposito(350);
            c2.Levantamento(100);


            ContaPoupanca c3 = new ContaPoupanca();

            c3.Deposito(1000);
            c3.Levantamento(130);


            ContaBancariaPoupanca c4 = new ContaBancariaPoupanca("oli", 12, 124.5);

            c4.Deposito(1200);
            c4.Levantamento(120);

            ContaBancariaPoupanca c5 = new ContaBancariaPoupanca("olu", 13, 1200.5, DateTime.Now);
        }