Home

 

Interface methods

The methods of the Bank interface are described in Table | -6.

Table 8-6

Method name Return type Parameters Exceptions
addCustomer void Customer customer CustomerAlreadyExistException
closeAccountOfCustomer void Customer customer, Account account InvalidAccountException, InvalidCustomerException
deposit void String accountNumber, BigDecimal amount InvalidAccountException, InvalidTransactionException
getAccountsForCustomer ArrayList
<Account>
String customerSsn InvalidCustomerException
getCustomers Map<String, Customer>    
getTransactionsForAccount ArrayList
<Transaction>
String accountNumber InvalidAccountException
openAccountForCustomer void Customer customer, Account account InvalidCustomerException, AccountAlreadyExistException
removeCustomer void Customer customer InvalidCustomerException
searchAccountByAccountNumber Account String accountNumber InvalidAccountException
searchCustomerBySsn Customer String ssn InvalidCustomerException
transfer void String debitAccountNumber, String creditAccountNumber, BigDecimal amount InvalidAccountException, InvalidTransactionException
updateCustomer void String ssn, String title, String firstName, String lastName InvalidCustomerException
withdraw void String accountNumber, BigDecimal amount InvalidAccountException, InvalidTransactionException

Method declarations of the Bank interface

ibm.com/redbooks