Esempio n. 1
0
        static void TermAction(TermDeposit acc, string actionType)
        {
            switch (actionType.ToLower())
            {
            case "withdraw":
                Console.WriteLine("enter withdraw amount");
                double withdraw = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("enter withdraw year");
                int year = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("enter withdraw month");
                int month = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("enter withdraw day");
                int      day = Convert.ToInt32(Console.ReadLine());
                DateTime end = new DateTime(year, month, day);

                acc.Withdraw(withdraw, end);
                break;

            case "transfer":
                Console.WriteLine("enter 2nd customer id ");
                int custid = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("enter 2nd account id");
                int    accId    = Convert.ToInt32(Console.ReadLine());
                var    acc2     = CustomerBL.GetAccount(custid, accId);
                double transfer = Convert.ToInt32(Console.ReadLine());
                acc.Transfer(acc, acc2, transfer);
                break;

            default:
                break;
            }
        }
Esempio n. 2
0
        static void Main(string[] args)
        {
            //new bank;
            //create cust 1
            Customer cust = new Customer("mark");

            CustomerBL.CreateCust(cust);
            Console.WriteLine(cust.CustId);

            //checking account 1
            CheckingAccount acc1 = new CheckingAccount("chase", 1200);

            acc1.Deposit(100);
            acc1.Deposit(100);
            acc1.Withdraw(10000);
            acc1.Withdraw(100);

            CustomerBL.AddChecking(cust, acc1);
            BusinessAccount capital = new BusinessAccount("capital", 1000, .05);

            capital.Withdraw(2000);
            CustomerBL.AddBusiness(cust, capital);

            //customer2
            Customer cust2 = new Customer("huang");

            CustomerBL.CreateCust(cust2);
            //Termdeposit 2
            DateTime end  = new DateTime(2019, 7, 30);
            var      acc2 = new TermDeposit("capital", 2000, 30);

            acc2.Withdraw(100, end);
            CustomerBL.AddTermDeposit(cust2, acc2);

            StartBank();
        }
Esempio n. 3
0
        double AnnualInterest; //fixed interest for all checking accounts
        static void Main(string[] args)
        {
            string end;


            Console.WriteLine("\nWelcome to BCMA Banking App!\n-----------------------" +
                              "---------------------------------------------------------\nBCMA allows you to manage your bank account easily and efficiently straight" +
                              " from your console.\n ");
            do
            {
                Console.WriteLine("\nWhich action would you like to perform?\n (1)  Register\n (2)  Open Account\n (3)  Close Account\n" +
                                  " (4)  Deposit\n (5)  Withdraw\n (6)  Transfer\n (7)  Display list of accounts\n (8)  Display list of transactions\n " +
                                  "(9)  Pay loan installment\n");
                //multiple choice kind of thing
                var action = Console.ReadLine();
                Console.WriteLine("--------------------------------");
                if (action == "1") //register
                {
                    Console.WriteLine("You have selected the register option\nPlease fill in your information below:\n");

                    Console.WriteLine("First name: ");
                    var fname = Console.ReadLine();


                    Console.WriteLine("Last name: ");
                    var lname = Console.ReadLine();
                    var name  = fname + " " + lname;

                    //Console.WriteLine("\n");

                    Console.WriteLine("\nUserID: ");
                    Console.ReadLine();

                    Console.WriteLine("Passcode: ");
                    Console.ReadLine();

                    Console.WriteLine("\nWelcome " + name + "!\nThank you for registering your account with BCMA bank.\n-------------Return to menu (q)" +
                                      "------------");
                    int      Id       = 100;
                    Customer customer = new Customer()
                    {
                        Firstname = fname,
                        Lastname  = lname,
                        Id        = Id
                    };
                    Random  random  = new Random();
                    Account account = new Account()
                    {
                        Id            = Id++,
                        accountNumber = random.Next(0, 10000)
                    };
                    customerList.Add(customer);
                    accountList.Add(account);
                    Id++;
                }
                else if (action == "2") //open
                {
                    //TODO: validate ID two customers cannot have the same ID
                    Console.WriteLine("\nWhat type of account would you like to open?\n (1)  Checking account\n" +
                                      " (2)  Business account\n (3)  Term Deposit\n (4)  Loan\n ");

                    var account = Console.ReadLine();
                    switch (account)
                    {
                    case "1":
                        Console.WriteLine("Please type in your Customer Id");
                        Random          random = new Random();
                        CheckingAccount ca     = new CheckingAccount()
                        {
                            Id            = Int32.Parse(Console.ReadLine()),
                            accountNumber = random.Next(0, 10000),
                            accountType   = "Checking",
                            Balance       = random.Next(0, 10000),
                        };

                        Console.Write("\nYour checking account has just been opened\nId:" + ca.Id + "\nAccount Number: " +
                                      ca.accountNumber + " \nAccount Type: " + ca.accountType + "\nStart Balance:  $" + ca.Balance);
                        double AnnualInterest = 0.5;     //fixed interest for all checking accounts
                        Console.WriteLine("\nAnnual Percent Yield(APY): " + AnnualInterest + "%");

                        accountList.Add(ca);

                        Console.WriteLine(" \n------------- Return to menu (q) ------------");
                        break;

                    case "2":
                        Console.WriteLine("Please type in your Customer Id");
                        Random          random1 = new Random();
                        BusinessAccount ba      = new BusinessAccount()
                        {
                            Id            = Int32.Parse(Console.ReadLine()),
                            accountNumber = random1.Next(0, 10000),
                            accountType   = "Business",
                            Balance       = random1.Next(0, 10000),
                        };
                        Console.Write("Your business account has just been opened\nId:" + ba.Id + "\nAccount Number: " + ba.accountNumber
                                      + "\nAccount Type: " + ba.accountType + "\nStart Balance: $" + ba.Balance);
                        double AnnualInterest2 = 0.6;
                        Console.WriteLine("\nAnnual Percent Yield(APY): " + AnnualInterest2 + "%");
                        accountList.Add(ba);
                        Console.WriteLine(" \n------------- Return to menu (q) ------------");
                        break;

                    case "3":    //term dep
                        Console.WriteLine("Please type in your Customer Id");
                        Random      random2 = new Random();
                        TermDeposit td      = new TermDeposit()
                        {
                            Id            = Int32.Parse(Console.ReadLine()),
                            accountNumber = random2.Next(0, 10000),
                            accountType   = "Term Deposit",
                            Balance       = random2.Next(0, 10000),
                        };
                        Console.Write("Your term deposit account has just been opened\n Id: " + td.Id + "\nAccount Number: " +
                                      td.accountNumber + " \nAccount Type: " + td.accountType + "\nStart Balance: $");
                        double AnnualInterest3 = 0.6;
                        Console.WriteLine("\nAnnual Percent Yield(APY): " + AnnualInterest3 + "%");
                        accountList.Add(td);
                        Console.WriteLine(" \n------------- Return to menu (q) ------------");
                        break;

                    case "4":    //loan
                        Console.WriteLine("Please type in your Customer Id");
                        Random random4 = new Random();
                        Loan   l       = new Loan()
                        {
                            Id            = Int32.Parse(Console.ReadLine()),
                            accountNumber = random4.Next(0, 10000),
                            accountType   = "Loan",
                        };
                        l.Balance = random4.Next(0, 10000);
                        Console.Write("Your loan has just been opened\n Id:" + l.Id + "\nAccount Number: " +
                                      l.accountNumber + " \nAccount Type: " + l.accountType + "\nStart Balance: $" + l.Balance);
                        accountList.Add(l);
                        Console.WriteLine(" \n------------- Return to menu (q) ------------");
                        break;

                    default:
                        Console.WriteLine("WARNING: No further action can be performed.\n Press q to " +
                                          "return back to the main menu...");
                        break;
                    }
                }
                else if (action == "3") //close
                                        //updates list With new values
                {
                    Console.WriteLine("Which account would you like to close?\n (1)Checking account\n " +
                                      "(2)Business account\n");

                    var account = Console.ReadLine();
                    switch (account)
                    {
                    case "1":     //checking account
                                  //essentailly need to delete from the list and update

                        Console.WriteLine("What is your ID number?");
                        var number = Convert.ToInt32(Console.ReadLine());
                        Console.WriteLine("Searching for Customer ID:\n " + number);
                        CheckingAccount ca = new CheckingAccount()
                        {
                            Id            = number,
                            accountNumber = 0,              //0 means closed
                            accountType   = "Checking"
                        };
                        Console.Write("Your checking account has been closed:\n Id:" + ca.Id + "\nAccount Number: "
                                      + ca.accountNumber + "\nAccount Type: " + ca.accountType);

                        Console.WriteLine(" \n------------- Return to menu (q) ------------");
                        break;

                    case "2":    //business account
                        Console.WriteLine("What is your ID number?");
                        var number1 = Convert.ToInt32(Console.ReadLine());
                        Console.WriteLine("Searching for Customer ID: " + number1);
                        BusinessAccount ba = new BusinessAccount()
                        {
                            Id            = number1,
                            accountNumber = 0,              //0 means closed
                            accountType   = "Business"
                        };

                        Console.Write("Your business account has been closed:\n Id:" + ba.Id + "\nAccount Number: "
                                      + ba.accountNumber + "\nAccount Type: " + ba.accountType);
                        Console.WriteLine(" \n------------- Return to menu(q) ------------");
                        break;

                    default:
                        Console.WriteLine("WARNING: No further action can be performed.\n Press q to " +
                                          "return back to the main menu...");
                        break;
                    }
                }
                else if (action == "4") //deposit
                {                       //TODO: Based on account number when you paste the number you should deposit into that specific account
                    //need a transaction list for each customer
                    Console.WriteLine("Which account would you like to deposit money into?\n (1)Checking account\n (2)Business account\n (3) Term Despoit\n ");
                    var account = Console.ReadLine();
                    switch (account)
                    {
                    case "1":
                        CheckingAccount ca = new CheckingAccount();
                        Console.WriteLine("Please enter your account number:\n");
                        ca.accountNumber = Int32.Parse(Console.ReadLine());
                        //Random random = new Random();
                        //ca.accountNumber = random.Next(0, 10000);
                        //Console.WriteLine("Your account number: " + ca.accountNumber);
                        ca.accountType = "Checking";
                        Console.WriteLine("How much would you like to deposit?");
                        ca.Balance = ca.Deposit(Convert.ToDouble(Console.ReadLine()));
                        // double amount = ca.Balance + l.Balance;
                        Console.WriteLine($"Id: {ca.Id}\nAccount Number: {ca.accountNumber}\n" +
                                          $"Account type: {ca.accountType}\nBalance: ${ca.Balance}");

                        // transactionList.Add(ca.Balance);

                        //foreach (Account item in accountList)
                        //{
                        //    if (ca.accountNumber == item.accountNumber)
                        //    {
                        //        Console.WriteLine("cno");
                        //        item.Balance += ca.Balance;
                        //    }
                        //}
                        transactionList.Add(ca.Balance);
                        Console.WriteLine(" \n------------- Return to menu (q) ------------");
                        break;

                    case "2":
                        BusinessAccount ba = new BusinessAccount();
                        Console.WriteLine("Please enter your Customer ID:\n");
                        ba.Id = Int32.Parse(Console.ReadLine());
                        Random random1 = new Random();
                        ba.accountNumber = random1.Next(0, 10000);
                        Console.WriteLine("Your account number: " + ba.accountNumber);
                        ba.accountType = "Checking";
                        Console.WriteLine("How much would you like to deposit?");
                        ba.Balance = ba.Deposit(Convert.ToDouble(Console.ReadLine()));
                        Console.WriteLine($"Id: {ba.Id}\nAccount Number: {ba.accountNumber}\n" +
                                          $"Account type: {ba.accountType}\nBalance: ${ba.Balance}");
                        transactionList.Add(ba.Balance);
                        Console.WriteLine(" \n------------- Return to menu (q) ------------");
                        break;

                    case "3":
                        TermDeposit td = new TermDeposit();
                        Console.WriteLine("Please enter your Customer ID:\n");
                        td.Id = Int32.Parse(Console.ReadLine());
                        Random random2 = new Random();
                        td.accountNumber = random2.Next(0, 10000);
                        Console.WriteLine("Your account number: " + td.accountNumber);
                        td.accountType = "Checking";
                        Console.WriteLine("How much would you like to deposit?");
                        td.Balance = td.Deposit(Convert.ToDouble(Console.ReadLine()));
                        Console.WriteLine($"Id: {td.Id}\nAccount Number: {td.accountNumber}\n" +
                                          $"Account type: {td.accountType}\nBalance: ${td.Balance}");
                        transactionList.Add(td.Balance);
                        Console.WriteLine(" \n------------- Return to menu (q) ------------");
                        break;

                    default:
                        Console.WriteLine("WARNING: No further action can be performed.\n Press q to " +
                                          "return back to the main menu...");

                        break;
                    }
                }
                else if (action == "5") //withdraw
                {
                    Console.WriteLine("Which account would you like to withdraw money from? (1)Checking account\n " +
                                      "(2)Business account\n (3) Term Deposit\n ");
                    var account = Console.ReadLine();
                    switch (account)
                    {
                    case "1":    //checking

                        CheckingAccount ca = new CheckingAccount();
                        Console.WriteLine("Please enter your Customer ID:\n");
                        ca.Id = Int32.Parse(Console.ReadLine());
                        Random random = new Random();
                        ca.accountNumber = random.Next(0, 10000);
                        Console.WriteLine("Your account number: " + ca.accountNumber);
                        ca.accountType = "Checking";
                        Console.WriteLine("How much would you like to withdraw?");
                        ca.Balance = ca.Withdraw(Convert.ToDouble(Console.ReadLine()));
                        Console.WriteLine(ca.Balance);
                        Console.WriteLine($"Id: {ca.Id}\nAccount Number: {ca.accountNumber}\n" +
                                          $"Account type: {ca.accountType}\nBalance: ${ca.Balance}");
                        transactionList.Add(ca.Balance);
                        Console.WriteLine(" \n------------- Return to menu (q) ------------");
                        break;

                    case "2":     //business
                        BusinessAccount ba = new BusinessAccount();

                        Console.WriteLine("Please enter your Customer ID:\n");
                        ba.Id = Int32.Parse(Console.ReadLine());

                        Random random1 = new Random();
                        ba.accountNumber = random1.Next(0, 10000);

                        Console.WriteLine("Your account number: " + ba.accountNumber);
                        ba.accountType = "Business";

                        Console.WriteLine("How much would you like to withdraw?");
                        ba.Balance = ba.Withdraw(Convert.ToDouble(Console.ReadLine()));

                        Console.WriteLine(ba.Balance);
                        Console.WriteLine($"Id: {ba.Id}\nAccount Number: {ba.accountNumber}\n" +
                                          $"Account type: {ba.accountType}\nBalance: ${ba.Balance}");
                        transactionList.Add(ba.Balance);
                        Console.WriteLine(" \n------------- Return to menu (q) ------------");
                        break;

                    case "3":     //term deposit
                        TermDeposit td = new TermDeposit();
                        Console.WriteLine("Please enter your Customer ID:\n");
                        td.Id = Int32.Parse(Console.ReadLine());
                        Random random2 = new Random();
                        td.accountNumber = random2.Next(0, 10000);
                        Console.WriteLine("Your account number: " + td.accountNumber);
                        td.accountType = "Term Deposit";
                        Console.WriteLine("How much would you like to withdraw?");
                        td.Balance = td.Withdraw(Convert.ToDouble(Console.ReadLine()));
                        Console.WriteLine(td.Balance);
                        Console.WriteLine($"Id: {td.Id}\nAccount Number: {td.accountNumber}\n" +
                                          $"Account type: {td.accountType}\nBalance: ${td.Balance}");
                        transactionList.Add(td.Balance);
                        Console.WriteLine(" \n------------- Return to menu (q) ------------");
                        break;

                    default:
                        Console.WriteLine("WARNING: No further action can be performed.\n Press q to " +
                                          "return back to the main menu...");
                        break;
                    }
                }

                else if (action == "6") //transfer
                {
                    Console.WriteLine("Which account would you like to transfer money from? " +
                                      "(1)Checking account\n (2)Business account\n ");

                    var account = Console.ReadLine();
                    switch (account)
                    {
                    case "1":
                        Console.WriteLine("You are now transferring money to your Business account\n");
                        Console.WriteLine("How much would you like to transfer?");
                        var transfer = Console.ReadLine();


                        CheckingAccount ca     = new CheckingAccount();
                        Transfer        t      = new Transfer();
                        double          amount = ca.Withdraw(Int32.Parse(transfer));
                        transactionList.Add(amount);
                        Console.WriteLine("transfer to business complete");
                        Console.WriteLine(" \n------------- Return to menu (q) ------------");
                        break;

                    case "2":
                        Console.WriteLine("You are now transferring money to your Business account\n");
                        Console.WriteLine("How much would you like to transfer?");
                        var transfer1 = Console.ReadLine();

                        Console.WriteLine("How much would you like to transfer?");
                        BusinessAccount ba      = new BusinessAccount();
                        Transfer        t1      = new Transfer();
                        double          amount1 = ba.Withdraw(Int32.Parse(transfer1));
                        transactionList.Add(amount1);
                        Console.WriteLine("transfer to business complete");
                        Console.WriteLine(" \n------------- Return to menu (q) ------------");
                        break;

                    default:
                        Console.WriteLine("WARNING: No further action can be performed.\n Press q to return to menu...");
                        break;
                    }
                }
                else if (action == "7") //display accounts
                {
                    foreach (Account item in accountList)
                    {
                        Console.WriteLine($"Id: {item.Id}\nAccount Number: {item.accountNumber}\n" +
                                          $"Account type: {item.accountType}");
                        Console.WriteLine("-----------------------------");
                    }
                }
                else if (action == "8")//display transactions
                {
                    //TODO: need to figure out how to print the acct number and transaction

                    foreach (double item in transactionList)
                    {
                        Console.WriteLine("What is your account number?");
                        var trans = Console.ReadLine();
                        Console.WriteLine($"\nAccount Number: {trans}");
                        Console.WriteLine($"Transaction history: $" + item);
                        Console.WriteLine("-----------------------------");
                    }
                }
                else if (action == "9") //pay loan
                {
                    Console.WriteLine("From which account would you like to pay your loan? (1)Checking (2) Business");
                    var pay = Console.ReadLine();
                    if (pay == "1") //checking
                    {
                        Console.WriteLine("What is your Customer Id?");
                        var id = Int32.Parse(Console.ReadLine());

                        Console.WriteLine("Customer Id:" + id);

                        CheckingAccount ca = new CheckingAccount();

                        Loan loan = new Loan();
                        Console.WriteLine("How much money would you like to pay? ");
                        loan.PayLoan(Convert.ToDouble(Console.ReadLine()));

                        double deduction = ca.Withdraw(loan.PayLoan(Convert.ToDouble(Console.ReadLine())));
                        transactionList.Add(deduction);
                        Console.WriteLine(" \n------------- Return to menu (q) ------------");
                    }
                    else if (pay == "2") //business
                    {
                        Console.WriteLine("What is your Customer Id?");
                        var id = Int32.Parse(Console.ReadLine());

                        Console.WriteLine("Customer Id:" + id);

                        BusinessAccount ba = new BusinessAccount();

                        Loan loan = new Loan();
                        Console.WriteLine("How much money would you like to pay? ");
                        loan.PayLoan(Convert.ToDouble(Console.ReadLine()));

                        double deduction = ba.Withdraw(loan.PayLoan(Convert.ToDouble(Console.ReadLine())));
                        transactionList.Add(deduction);
                        Console.WriteLine(" \n------------- Return to menu (q) ------------");
                    }
                }
                else
                {
                    Console.WriteLine("WARNING: No further action can be performed.\n Return to menu q...");
                }

                end = Console.ReadLine();
            } while (end == "q");
        }
Esempio n. 4
0
        public static List <IBankCustomer> CreateListDatabase()
        {
            var temp = new BankCustomer()
            {
                CustomerId           = TypeFactory.GenerateCustomerID(),
                FirstName            = "William",
                LastName             = "Ennin",
                Address              = "5 Bayley Ave",
                City                 = "Yonker",
                State                = "New York",
                ZipCode              = 10705,
                Gender               = "M",
                Email                = "*****@*****.**",
                UserName             = "******",
                Password             = "******",
                CustomerAccounts     = new List <IAccount>(),
                CustomerLoans        = new List <ILoan>(),
                CustomerTermDeposits = new List <ITermDeposit>()
            };
            var bAcc = new BankAccount(TypeFactory.GenerateAccountID(), 41256.00, TypeFactory.CheckingAccount, new List <ITransaction>(), new List <ILoan>(), null);

            bAcc.DateCreated = DateTime.Now.AddDays(-340);
            bAcc.AccountTransactions.Add(new BankTransaction(1234.45, TypeFactory.DepositTransaction, DateTime.Now.AddDays(-300), TypeFactory.GenerateTransactionID()));
            bAcc.AccountTransactions.Add(new BankTransaction(5238.44, TypeFactory.DepositTransaction, DateTime.Now.AddDays(-296), TypeFactory.GenerateTransactionID()));
            bAcc.AccountTransactions.Add(new BankTransaction(1856.12, TypeFactory.WithdrawalTransaction, DateTime.Now.AddDays(-284), TypeFactory.GenerateTransactionID()));
            bAcc.AccountTransactions.Add(new BankTransaction(9534.36, TypeFactory.DepositTransaction, DateTime.Now.AddDays(-280), TypeFactory.GenerateTransactionID()));
            bAcc.AccountTransactions.Add(new BankTransaction(1758.81, TypeFactory.WithdrawalTransaction, DateTime.Now.AddDays(-176), TypeFactory.GenerateTransactionID()));
            bAcc.AccountTransactions.Add(new BankTransaction(1784.74, TypeFactory.DepositTransaction, DateTime.Now.AddDays(-144), TypeFactory.GenerateTransactionID()));
            temp.CustomerAccounts.Add(bAcc);
            bankCustomers.Add(temp);

            var bAcc1 = new BankAccount(TypeFactory.GenerateAccountID(), 251256.14, TypeFactory.BusinessAccount, new List <ITransaction>(), new List <ILoan>(), null);

            bAcc1.OverDraftInterestRate = .05;
            bAcc1.DateCreated           = DateTime.Now.AddDays(-1336);
            bAcc1.AccountTransactions.Add(new BankTransaction(1894.45, TypeFactory.DepositTransaction, DateTime.Now.AddDays(-268), TypeFactory.GenerateTransactionID()));
            bAcc1.AccountTransactions.Add(new BankTransaction(4538.44, TypeFactory.DepositTransaction, DateTime.Now.AddDays(-255), TypeFactory.GenerateTransactionID()));
            bAcc1.AccountTransactions.Add(new BankTransaction(1894.45, TypeFactory.DepositTransaction, DateTime.Now.AddDays(-238), TypeFactory.GenerateTransactionID()));
            bAcc1.AccountTransactions.Add(new BankTransaction(1898.12, TypeFactory.WithdrawalTransaction, DateTime.Now.AddDays(-192), TypeFactory.GenerateTransactionID()));
            bAcc1.AccountTransactions.Add(new BankTransaction(1234.45, TypeFactory.DepositTransaction, DateTime.Now.AddDays(-184), TypeFactory.GenerateTransactionID()));
            bAcc1.AccountTransactions.Add(new BankTransaction(5238.44, TypeFactory.DepositTransaction, DateTime.Now.AddDays(-161), TypeFactory.GenerateTransactionID()));
            bAcc1.AccountTransactions.Add(new BankTransaction(1856.12, TypeFactory.WithdrawalTransaction, DateTime.Now.AddDays(-151), TypeFactory.GenerateTransactionID()));
            bAcc1.AccountTransactions.Add(new BankTransaction(9534.36, TypeFactory.DepositTransaction, DateTime.Now.AddDays(-141), TypeFactory.GenerateTransactionID()));
            bAcc1.AccountTransactions.Add(new BankTransaction(1758.81, TypeFactory.WithdrawalTransaction, DateTime.Now.AddDays(-132), TypeFactory.GenerateTransactionID()));
            bAcc1.AccountTransactions.Add(new BankTransaction(1784.74, TypeFactory.DepositTransaction, DateTime.Now.AddDays(-128), TypeFactory.GenerateTransactionID()));
            bAcc1.AccountTransactions.Add(new BankTransaction(9534.36, TypeFactory.DepositTransaction, DateTime.Now.AddDays(-122), TypeFactory.GenerateTransactionID()));
            bAcc1.AccountTransactions.Add(new BankTransaction(78956.81, TypeFactory.WithdrawalTransaction, DateTime.Now.AddDays(-87), TypeFactory.GenerateTransactionID()));
            bAcc1.AccountTransactions.Add(new BankTransaction(1784.74, TypeFactory.DepositTransaction, DateTime.Now.AddDays(-22), TypeFactory.GenerateTransactionID()));
            temp.CustomerAccounts.Add(bAcc1);
            bankCustomers.Add(temp);

            var loan = new BankLoan()
            {
                InterestRate     = .1,
                Amount           = 15000,
                LoanId           = TypeFactory.GenerateLoanID(),
                Type             = TypeFactory.PersonalLoan,
                Balance          = 15000,
                LoanTransactions = new List <ITransaction>(),
                DateCreated      = DateTime.Now.AddDays(-340)
            };

            loan.MakePayment(new BankTransaction(1894.45, TypeFactory.PaymentTransaction, DateTime.Now.AddDays(-268), TypeFactory.GenerateTransactionID()));
            loan.MakePayment(new BankTransaction(4538.44, TypeFactory.PaymentTransaction, DateTime.Now.AddDays(-255), TypeFactory.GenerateTransactionID()));
            loan.MakePayment(new BankTransaction(1894.45, TypeFactory.PaymentTransaction, DateTime.Now.AddDays(-238), TypeFactory.GenerateTransactionID()));
            loan.MakePayment(new BankTransaction(1898.12, TypeFactory.PaymentTransaction, DateTime.Now.AddDays(-192), TypeFactory.GenerateTransactionID()));

            var loan1 = new BankLoan()
            {
                InterestRate     = .07,
                Amount           = 24000,
                LoanId           = TypeFactory.GenerateLoanID(),
                Type             = TypeFactory.BusinessLoan,
                Balance          = 24000,
                LoanTransactions = new List <ITransaction>(),
                DateCreated      = DateTime.Now.AddDays(-360)
            };

            loan1.MakePayment(new BankTransaction(2894.54, TypeFactory.PaymentTransaction, DateTime.Now.AddDays(-278), TypeFactory.GenerateTransactionID()));
            loan1.MakePayment(new BankTransaction(538.14, TypeFactory.PaymentTransaction, DateTime.Now.AddDays(-245), TypeFactory.GenerateTransactionID()));
            loan1.MakePayment(new BankTransaction(1004.88, TypeFactory.PaymentTransaction, DateTime.Now.AddDays(-228), TypeFactory.GenerateTransactionID()));
            loan1.MakePayment(new BankTransaction(2298.42, TypeFactory.PaymentTransaction, DateTime.Now.AddDays(-12), TypeFactory.GenerateTransactionID()));

            var termDeposit = new TermDeposit()
            {
                AccountNumber       = TypeFactory.GenerateTermDepositID(),
                Amount              = 85000,
                Balance             = 85000,
                Type                = TypeFactory.TermDeposit,
                AccountTransactions = new List <ITransaction>(),
                DateCreated         = DateTime.Now.AddDays(-300),
                DateOfMaturity      = DateTime.Now.AddDays(+458),
                InterestRate        = .08,
                PenaltyInterestRate = .12,
                TotalPenalty        = 0
            };

            var termDeposit1 = new TermDeposit()
            {
                AccountNumber       = TypeFactory.GenerateTermDepositID(),
                Amount              = 85000,
                Balance             = 85000,
                Type                = TypeFactory.TermDeposit,
                AccountTransactions = new List <ITransaction>(),
                DateCreated         = DateTime.Now.AddDays(-260),
                DateOfMaturity      = DateTime.Now.AddDays(+418),
                InterestRate        = .09,
                PenaltyInterestRate = .14,
                TotalPenalty        = 0
            };

            termDeposit.Withdraw(new BankTransaction(1194.45, TypeFactory.WithdrawalTransaction, DateTime.Now.AddDays(-268), TypeFactory.GenerateTransactionID()));
            termDeposit.Withdraw(new BankTransaction(3438.44, TypeFactory.WithdrawalTransaction, DateTime.Now.AddDays(-255), TypeFactory.GenerateTransactionID()));
            termDeposit.Withdraw(new BankTransaction(1571.45, TypeFactory.WithdrawalTransaction, DateTime.Now.AddDays(-238), TypeFactory.GenerateTransactionID()));
            termDeposit.Withdraw(new BankTransaction(8448.12, TypeFactory.WithdrawalTransaction, DateTime.Now.AddDays(-192), TypeFactory.GenerateTransactionID()));

            termDeposit1.Withdraw(new BankTransaction(5248.11, TypeFactory.WithdrawalTransaction, DateTime.Now.AddDays(-268), TypeFactory.GenerateTransactionID()));
            termDeposit1.Withdraw(new BankTransaction(4826.78, TypeFactory.WithdrawalTransaction, DateTime.Now.AddDays(-255), TypeFactory.GenerateTransactionID()));
            termDeposit1.Withdraw(new BankTransaction(1691.45, TypeFactory.WithdrawalTransaction, DateTime.Now.AddDays(-238), TypeFactory.GenerateTransactionID()));
            termDeposit1.Withdraw(new BankTransaction(9248.25, TypeFactory.WithdrawalTransaction, DateTime.Now.AddDays(-192), TypeFactory.GenerateTransactionID()));

            temp.CustomerTermDeposits.Add(termDeposit);
            temp.CustomerTermDeposits.Add(termDeposit1);
            temp.CustomerLoans.Add(loan);
            temp.CustomerLoans.Add(loan1);
            return(bankCustomers);
        }