We have finally introduced enough Java mechanics to define the data required to represent the department directory entries described in Section 1.2.5. Recall that a directory entry is a object with the following fields and methods:
Fields:
String name;
String address;
String phone;
Methods:
String getName();
String getAddress();
String getPhone();
In Java, we define this new form of data as the class
class Entry {
String name;
String address;
String phone;
String getName() { return name; }
String getAddress() { return address; }
String getPhone() { return phone; }
}