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); }
public virtual void Withdraw(Account acc, int amount) { acc.Withdraw(acc.Id, amount); }