A B C E F G H I L M N O P R S T W 

A

Account - Class in bank
Abstract superclass of all representatives of accounts, i.e.
Account(int) - Constructor for class bank.Account
 
accountBalance() - Method in class bank.Account
 
accountBalance() - Method in class bank.ATM
Determine the balance of the current account.
accountBalance() - Method in class bank.OfflineAccountProxy
 
accountBalance() - Method in class bank.PermanentAccount
 
accountExists(int) - Method in class bank.CentralHost
 
accountNumber - Variable in class bank.Account
Account number of the account represented by this object TODO: replace public with private; this seems to be a problem with the JML-DL translation (accountNumber is not visible in JML specs for subclasses if the Java visibility is private)
AccountStatementRequest - Class in bank
Class for representing the transaction of requesting a printed account statement.
AccountStatementRequest(int) - Constructor for class bank.AccountStatementRequest
 
addTransaction(Transaction) - Method in class bank.Account
Add a transaction trance to the list of stored transaction
ATM - Class in bank
Class whose objects represent the automated teller machines of our bank.
ATM(CentralHost) - Constructor for class bank.ATM
 

B

balanceIsAccessible() - Method in class bank.Account
 
balanceIsAccessible() - Method in class bank.OfflineAccountProxy
 
balanceIsAccessible() - Method in class bank.PermanentAccount
 
bank - package bank
 
BankCard - Class in bank
Class for representing bank cards.
BankCard(int, int) - Constructor for class bank.BankCard
 

C

cardIsInvalid() - Method in class bank.BankCard
 
CentralHost - Class in bank
Class that represents the central host of our bank.
CentralHost() - Constructor for class bank.CentralHost
 
checkAndWithdraw(int) - Method in class bank.Account
Try to withdraw amount from the account with checking whether this is possible, return the amount of money that is given out
Clock - Class in bank
Singleton class for representing an assumed system-wide clock (for simplicity we suppose that both the central host and all ATMs are running on the same clock).
confiscateCard() - Method in class bank.ATM
Confiscate an inserted card.
createAccount(int) - Method in class bank.CentralHost
Create a new account with account number accountNumber

E

ejectCard() - Method in class bank.ATM
Eject an inserted card
EMPTY_LIST - Static variable in class bank.TransactionList
 
enterPIN(int) - Method in class bank.ATM
Enter the PIN the belongs to the currently inserted bank card into the ATM.

F

flushTransactions() - Method in class bank.Account
Remove all transactions that have been pushed using addTransaction

G

getAccount(int) - Method in class bank.CentralHost
Obtain the account with number accountNumber
getAccountNumber() - Method in class bank.Account
 
getAccountNumber() - Method in class bank.BankCard
 
getAmount() - Method in class bank.Withdrawal
 
getBigBangsDate() - Static method in class bank.Clock
 
getCurrentDate() - Static method in class bank.Clock
 
getDate() - Method in class bank.Transaction
 
getInstance() - Static method in class bank.Clock
 
getTransactions() - Method in class bank.Account
Get all transactions that have been performed for this account.

H

head() - Method in class bank.TransactionList
 
head() - Method in class bank.TransactionListCons
 
head() - Method in class bank.TransactionListNIL
 

I

insertCard(BankCard) - Method in class bank.ATM
Insert the given card into the ATM.
isEarlier(int, int) - Static method in class bank.Clock
 
isEmpty() - Method in class bank.TransactionList
 
isEmpty() - Method in class bank.TransactionListCons
 
isEmpty() - Method in class bank.TransactionListNIL
 
isLater(int, int) - Static method in class bank.Clock
 
isSameDay(int, int) - Static method in class bank.Clock
 
isSameMonth(int, int) - Static method in class bank.Clock
 
issueCard(int, int) - Method in class bank.CentralHost
Issue a bank card for the account with number accountNumber and setup the card with the given PIN

L

length() - Method in class bank.TransactionList
 
length() - Method in class bank.TransactionListCons
 
length() - Method in class bank.TransactionListNIL
 

M

main(String[]) - Static method in class bank.CentralHost
An example scenario
makeCardInvalid() - Method in class bank.BankCard
Invalidate a card

N

newWithdrawalIsPossible(int) - Method in class bank.Account
Determine whether a certain amount of money may be withdrawn.
newWithdrawalIsPossible(int) - Method in class bank.OfflineAccountProxy
Determine whether a certain amount of money may be withdrawn.
newWithdrawalIsPossible(int) - Method in class bank.PermanentAccount
Determine whether a certain amount of money may be withdrawn.

O

OfflineAccountProxy - Class in bank
Class for representing accounts in an ATM that is switched offline.
OfflineAccountProxy(int) - Constructor for class bank.OfflineAccountProxy
 

P

PermanentAccount - Class in bank
Permanent representation of information about an account.
PermanentAccount(int, int) - Constructor for class bank.PermanentAccount
 
pinIsCorrect(int) - Method in class bank.BankCard
Determine whether a given PIN is correct for this card.
prepend(Transaction) - Method in class bank.TransactionList
Construct a list whose first element is trans, and whose tail is this list

R

replay(PermanentAccount) - Method in class bank.AccountStatementRequest
The design pattern "Strategy" is used for implementing the synchronisation of offline account proxies with the permanent accounts.
replay(PermanentAccount) - Method in class bank.OfflineAccountProxy
Make the transactions buffered in this object persistent by copying them to a permanent account
replay(PermanentAccount) - Method in class bank.Transaction
The design pattern "Strategy" is used for implementing the synchronisation of offline account proxies with the permanent accounts.
replay(PermanentAccount) - Method in class bank.Withdrawal
The design pattern "Strategy" is used for implementing the synchronisation of offline account proxies with the permanent accounts.
requestAccountStatement() - Method in class bank.ATM
Request a printed account statement for the current account
requestStatement() - Method in class bank.Account
Request a printed account statement.
requestStatement() - Method in class bank.OfflineAccountProxy
Request a printed account statement.
requestStatement() - Method in class bank.PermanentAccount
Request a printed account statement.

S

sendAccountStatement() - Method in class bank.PermanentAccount
Simulate the sending of an account statement ...
setOnline(boolean) - Method in class bank.ATM
Switch the status of this ATM to online or offline.

T

tail() - Method in class bank.TransactionList
 
tail() - Method in class bank.TransactionListCons
 
tail() - Method in class bank.TransactionListNIL
 
tick() - Static method in class bank.Clock
Make the time progress (don't care about overflows ...)
toString() - Method in class bank.AccountStatementRequest
 
toString() - Method in class bank.CentralHost
 
toString() - Method in class bank.PermanentAccount
 
toString() - Method in class bank.Withdrawal
 
Transaction - Class in bank
Abstract class for representing transactions.
Transaction(int) - Constructor for class bank.Transaction
 
TransactionList - Class in bank
Simple implementation of a list datatype for transactions.
TransactionList() - Constructor for class bank.TransactionList
 
TransactionListCons - Class in bank
Class for representing non-empty lists of transactions.
TransactionListCons(Transaction, TransactionList) - Constructor for class bank.TransactionListCons
Use the method TransactionList.prepend for creating non-empty lists
TransactionListNIL - Class in bank
Singleton class for empty lists of transactions
TransactionListNIL() - Constructor for class bank.TransactionListNIL
This class is a singleton, to access the only object use TransactionList.EMPTY_LIST
transactionListToString() - Method in class bank.Account
Helper method, used by the two subclasses of this class for implementing toString
transactions - Variable in class bank.Account
A list of transactions in which the most recent transaction is the first element

W

withdraw(int) - Method in class bank.Account
Withdraw amount from the account
withdraw(int) - Method in class bank.ATM
Try to withdraw amount from the current account.
withdraw(int) - Method in class bank.OfflineAccountProxy
Withdraw amount from the account
withdraw(int) - Method in class bank.PermanentAccount
Withdraw amount from the account TODO: should the premiss "clock.isEarlier(clock.instance.currentDate, dateOfLatestWithdrawal)" rather be made some kind of invariant?
Withdrawal - Class in bank
Class for representing the transaction kind withdrawal, i.e.
Withdrawal(int, int) - Constructor for class bank.Withdrawal
 
A B C E F G H I L M N O P R S T W