1 5 6 7 package phoneList.business; 8 9 import phoneList.spec.Person; 10 11 public class PersonImpl implements Person { 12 private String firstName; 13 private String lastName; 14 private String phoneNumber; 15 private String id; 16 17 public PersonImpl () { 18 } 19 20 public PersonImpl (String firstName, String lastName, String phoneNumber, String id) { 21 this.firstName = firstName; 22 this.lastName = lastName; 23 this.phoneNumber = phoneNumber; 24 this.id = id; 25 } 26 27 public void setFirstName (String firstName) { 28 this.firstName = firstName; 29 } 30 31 public String getFirstName () { 32 return firstName; 33 } 34 35 public void setLastName (String lastName) { 36 this.lastName = lastName; 37 } 38 39 public String getLastName () { 40 return lastName; 41 } 42 43 public void setPhoneNumber (String phoneNumber) { 44 this.phoneNumber = phoneNumber; 45 } 46 47 public String getPhoneNumber () { 48 return phoneNumber; 49 } 50 51 public void setId (String id) { 52 this.id = id; 53 } 54 55 public String getId () { 56 return id; 57 } 58 59 public String toString () { 60 return firstName + " " + lastName + " " + phoneNumber + " " + id; 61 } 62 } 63 64 65 66 | Popular Tags |