Home

 

Interface and class fields and getter and setter methods

The fields of the interfaces are described in Table | -4 and the fields of the classes are described in Table | -5. The fields marked with *) are the implementations of UML associations.

Table 8-4

Interface Field Type Initial value Visibility, Modifiers
TransactionType CREDIT String "CREDIT" public static final
DEBIT String "DEBIT" public static final

Fields of the interfaces

Table 8-5

Class Field name Type Initial value Visibility, Modifiers Methods
ITSOBank accounts *) customers *) Map<String,Account> Map<String, Customer> mull private getter: public, setter: private
customer
Accounts
Map<String,
| rrayList<Account>>
bank ITSOBank new
private static getter: public static
Account accountNumber java.lang.String null private getter: public, setter: private
balance java.math.BigDecimal
transactions *) ArrayList<Transaction>
Customer ssn title firstName lastName java.lang.String null private getter: public, setter: private
accounts *) ArrayList<Account>
Transaction timeStamp Timestamp null private
amount java.math.BigDecimal
transactionId int 0
AccountAlready
ExistException
accountNumber java.lang.String null private
CustomerAlready
ExistException
ssn java.lang.String null private
InvalidAccount
Exception
accountNumber java.lang.String null private
InvalidAmount
Exception
amount java.lang.String null private
InvalidCustomer
Exception
ssn java.lang.String null private
Invalid
Transaction
Exception
transactionType java.lang.String null private
amount java.math.BigDecimal
account Account

Fields and getter and setter methods of the classes

ibm.com/redbooks