Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Bank bank = new Bank();
            Account acc = new Account(1);
            bank.Withdraw(acc, 100);

            Account saving = new SavingAccount(2);
            bank.Withdraw(saving, 100);
        }
Ejemplo n.º 2
0
 public virtual void Withdraw(Account acc, int amount)
 {
     acc.Withdraw(acc.Id, amount);
 }