static void Main() { // Making instances of all types of accounts with the two types of customers DepositAccount first = new DepositAccount(new IndividualCustomer("Jimmy Hendrix"), 1500, 5); DepositAccount second = new DepositAccount(new CompanyCustomer("Jimmy Hendrix"), 500, 5); LoanAccount third = new LoanAccount(new IndividualCustomer("Jimmy Hendrix"), 4000, 7); LoanAccount fourth = new LoanAccount(new CompanyCustomer("Jimmy Hendrix"), 50000, 3); MortgageAccount fifth = new MortgageAccount(new IndividualCustomer("Jimmy Hendrix"), 34000, 4); MortgageAccount sixth = new MortgageAccount(new CompanyCustomer("Jimmy Hendrix"), 19000, 9); // Testing the DepositMoney, WithDrawMoney and CalculateInterest methods for all account types Console.WriteLine("INDIVIDUAL DEPOSIT ACCOUNT:"); Console.WriteLine("Balance: {0}", first.Balance); first.DepositMoney(10); Console.WriteLine("Balance after deposit: {0}", first.Balance); first.WithDrawMoney(150); Console.WriteLine("Balance after withdraw: {0}", first.Balance); Console.WriteLine("Calculate interest: {0}", first.CalculateInterest(5)); Console.WriteLine(); Console.WriteLine("CUSTOMER DEPOSIT ACCOUNT: "); Console.WriteLine("Balance: {0}", second.Balance); second.DepositMoney(2000); Console.WriteLine("Balance after deposit: {0}", second.Balance); second.WithDrawMoney(1800); Console.WriteLine("Balance after withdraw: {0}", second.Balance); Console.WriteLine("Calculate interest: {0}", second.CalculateInterest(9)); Console.WriteLine(); Console.WriteLine("INDIVIDUAL LOAN ACCOUNT:"); Console.WriteLine("Balance: {0}", third.Balance); third.DepositMoney(60); Console.WriteLine("Balance after deposit: {0}", third.Balance); Console.WriteLine("Calculate interest: {0}", third.CalculateInterest(7)); Console.WriteLine(); Console.WriteLine("CUSTOMER LOAN ACCOUNT:"); Console.WriteLine("Balance: {0}", fourth.Balance); fourth.DepositMoney(60); Console.WriteLine("Balance after deposit: {0}", fourth.Balance); Console.WriteLine("Calculate interest: {0}", fourth.CalculateInterest(9)); Console.WriteLine(); Console.WriteLine("INDIVIDUAL MORTGAGE ACCOUNT:"); Console.WriteLine("Balance: {0}", fifth.Balance); fifth.DepositMoney(100); Console.WriteLine("Balance after deposit: {0}", fifth.Balance); Console.WriteLine("Calculate interest: {0}", fifth.CalculateInterest(6)); Console.WriteLine(); Console.WriteLine("CUSTOMER MORTGAGE ACCOUNT:"); Console.WriteLine("Balance: {0}", sixth.Balance); sixth.DepositMoney(100); Console.WriteLine("Balance after deposit: {0}", sixth.Balance); Console.WriteLine("Calculate interest: {0}", sixth.CalculateInterest(11)); // Testing the Bank class and the AddAccount method Bank newBank = new Bank(LoadList()); Console.WriteLine(); newBank.AddAccount(new DepositAccount(new IndividualCustomer("Joe Rogan"), 780, 3)); Console.WriteLine("Type of customer: " + newBank.Accounts[6].Customer.GetType().Name); Console.WriteLine("Name: " + newBank.Accounts[6].Customer.Name); Console.WriteLine("Balance: " + newBank.Accounts[6].Balance); Console.WriteLine("Interest rate: " + newBank.Accounts[6].InterestRate); }