Lecture 2
10
Bank object’s fields (code)
•From Bank.java, showing types and names of four fields
•                        type         name
•22 private String bankName; // Bank’s name
•23
•24 private Terminal atm; // talks to customer
•25
•26 private BankAccount account1;
•27 private BankAccount account2;
•Conventions:
–Class names always begin with an upper case letter
–Field names always begins with a lower case letter
•If type is a class then value is that kind of object