public void Transfer(IWithdrawalAndDepositAccount from, IDepositAccount to, decimal amount) { if (from.Amount < amount) { throw new InvalidOperationException(); } from.Withdraw(amount); to.Deposit(amount); }
public void DepositMoneyTo(IDepositAccount depositAccount, decimal amount) { depositAccount.Deposit(amount); }