Beispiel #1
0
 public void Init()
 {
     source = new BankAccount();
     source.Deposit(200.00F);
     destination = new BankAccount();
     destination.Deposit(150.00F);
 }
Beispiel #2
0
        public int TransferFunds(BankAccount destination, float amount, BankAccount source)
        {
            if (source.Balance < amount) return 0; // throw new InsufficientFundsException();
             if (source.Balance - amount < MinimumBalance) return 0; // throw new InsufficientFundsException();

             destination.Deposit(amount);
            Withdraw(amount);
            return 1;
        }
Beispiel #3
0
 public void Init()
 {
     source = new BankAccount();
     source.Deposit(200.00F);
     destination = new BankAccount();
     destination.Deposit(150.00F);
     destination.MinimumBalance = 100.00F;
     source.MinimumBalance = 50.00F;
 }