Exemplo n.º 1
0
        public bool TransferTo(double amount, BankAccount3 another)
        {
            bool isTransferToSuccess = false;

            if (Withdraw(amount))
            {
                // balance -= amount;
                // another.balance += amount;
                another.Deposit(amount);
                isTransferToSuccess = true;
            }
            else
            {
                Console.Error.WriteLine("TransferTo for {0} is unsuccessful",
                                        AccountHolder);
            }
            return(isTransferToSuccess);
        }
Exemplo n.º 2
0
        // Methods

        public void AddAccount(BankAccount3 bankAccount)
        {
            bankAccounts.Add(bankAccount);
        }