static void Main(string[] args)
        {
            //Select the commented lines below  
            //Ctrl+K+U -> Ctrl+C ->Ctrl+K+C
            //Paste them into the console

//Wessex Bank plc
//FName MName LName
//234.567
//GB82 WEST 1234 5698 7654 32
//5337 8172 9295 0938
//3112 2913 0550 5467
//4929 9302 3989 5624

            Account bankAccount = new Account();
            bankAccount.FillInfo();
            Console.Clear();
            Console.WriteLine(bankAccount);
        }
Example #2
0
        static void Test(Account account, int months = 12)
        {
            Console.WriteLine(account.Customer);

            for (int i = 1; i < months; i++)
                Console.WriteLine(account.CalculateInterest(i));

            Console.WriteLine();
        }
Example #3
0
        public Bank RemoveAccount(Account account)
        {
            this.accounts.Remove(account);

            return this;
        }
Example #4
0
 public void AddAccount(Account a)
 {
     accounts.Add(a);
 }
Example #5
0
    public void TransferTo(int amount, Account a)
    {
      Contract.Requires(a != null);
      Contract.Requires(a.value >= 0);
      Contract.Requires(amount >= 0);
      Contract.Requires(value - amount >= 0);

      Contract.Ensures((Contract.OldValue<int>(value) + Contract.OldValue<int>(a.value)) == (value + a.value));

      Contract.Ensures(a.value == Contract.OldValue<int>(a.value) + amount);
      Contract.Ensures(value == Contract.OldValue<int>(value) - amount);

      Withdraw(amount);
      a.Dispose(amount);
    }