public class PhoneBookEntry { // the following will be instance variables private String lastName, firstName, phoneNumber; // This constructor creates an instance of the object only. public PhoneBookEntry () { lastName = ""; firstName = ""; phoneNumber = ""; } // This constructor sets the names and phone numbers public PhoneBookEntry (String first, String last, String number) { lastName = last; firstName = first; phoneNumber = number; } // Here are the accessors we need public String getLastName() { return lastName; } public String getFirstName() { return firstName; } public String getPhoneNumber() { return phoneNumber; } public String toString(){ return firstName + " " + lastName + ", " + phoneNumber; } }