KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > phoneList > business > PersonImpl


1 /*
2  * put your module comment here
3  * formatted with JxBeauty (c) johann.langhofer@nextra.at
4  */

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