Home

 

BankClient class

As the starting class for the sample application, it basically creates an instance of the ITSOBank class and uses the different Customer, Account, and Transaction methods to operate with the bank information. Example | 1 shows some of the relevant Java source code in simplified format of the BankClient class.

Example 8-1 BankClient class (abbreviated)

package itso.rad75.bank.client;
public class BankClient {
	public static void main(String[] args) {
		Bank iTSOBank = ITSOBank.getBank();
		executeCustomerTransactions(iTSOBank);
	}

	private static void executeCustomerTransactions(Bank bank) 
				throws ITSOBankException {
		......
		customer1 = new Customer("xxx-xx-xxxx", "Mr", "Juan","Napoli");
		bank.addCustomer(oCustomer);
		(...)
	}
}

ibm.com/redbooks