Method Name

Return Value

Parameters

Exceptions*

Description

closeAccount

 

Indication of whether transaction or not was successful (boolean)

accountID (long);

Invalid account exception (incorrect account ID, etc.);

non-zero balance exception;

A bank teller closes one account of a particular customer

createAccount

 

accountID (long)

customerID (long); newAccount (Account);

Invalid customer exception (incorrect customer ID, etc.);

A bank teller creates a new account for a particular customer

createCustomer

 

customerID (long)

newCustomer (Customer);

 

A bank teller creates a new customer with valid initial information

depositMoney

 

New balance of the account (double)

accountID (long);

Invalid amount exception (amount less than zero, etc.);

Invalid account exception (incorrect account ID, etc.);

A bank teller adds an amount of money to an account

editCustomer

 

Indication of whether or not transaction was successful (boolean)

customerID (long); theCustomer (Customer);

Invalid customer exception (incorrect customer ID, etc.);

A bank teller changes customer personal information

getTransactionHistory

Collection of transaction records (list)

accounted (long);

Invalid account exception (incorrect account ID, etc.);

A bank teller queries the complete transaction history of an account

getTransactionHistory

 

Collection of transaction records (list)

accounted (long); lastN (long);

Invalid account exception (incorrect account ID, etc.);

A bank teller queries the last N transaction history of an account

login

If transaction is success or not (boolean)

username (String);

password (String);

Invalid user credentials exception (invalid username, password, etc.);

A bank teller logs in to the banking system

logout

 

void

void

 

A bank teller logs out of the banking system

transferMoney

 

Remaining balance from the source account (double)

fromAccountID (long);

toAccountID (long); amount (double);

Invalid amount exception (amount less than zero, etc.);

Invalid account exception (incorrect account ID, etc.);

insufficient amount exception (insufficient money in the source account);

A bank teller transfers an amount of money from one account to another one

withdrawMoney

 

Remaining balance of the account (double)

accountID (long);

Invalid amount exception (amount less than zero, etc.);

Insufficient amount exception (insufficient money in the account);

Invalid account exception (incorrect account ID, etc.);

A bank teller subtracts an amount of money to an account

*All methods include the EJB RemoteException;