public void Init() { // == Assemble == this.sourceAccount = new Account("SB34589"); this.sourceAccount.Deposit(40000); this.destinationAccount = new Account("SB85736"); this.destinationAccount.Deposit(60000); }
public void TransferFunds(Account destination, int amount) { if ((this.balance - amount) < this.minimumBalance) { throw new InsufficientFundsException(string.Format("Insufficinet fund in {0}", this.GetType().Name)); } destination.Deposit(amount); this.Withdraw(amount); }