-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPerson.java
More file actions
44 lines (37 loc) · 1.17 KB
/
Person.java
File metadata and controls
44 lines (37 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import java.io.Serializable;
public class Person implements Serializable{
/**
*
*/
private static final long serialVersionUID = 1L;
private String fName;
private String lName;
private Integer id;
private Integer phone;
private String home;
public Person(String fName, String lName, Integer id, Integer phone, String home){
this.fName = fName;
this.lName = lName;
this.id = id;
this.phone = phone;
this.home = home;
}
public Person(String lName) {this.lName = lName;}
// Getters
public String getfName() {return this.fName; }
public String getlName() {return this.lName; }
public Integer getID() {return this.id;}
public Integer getPhone() {return this.phone;}
public String getHome() {return this.home;}
// Setters
public void setFName(String name) {this.fName = name;}
public void setLName(String name) {this.lName = name;}
public void setID(Integer id) {this.id = id;}
public void setPhone(Integer phone) {this.phone = phone;}
public void setHome(String home) {this.home = home;}
@Override
public String toString() {
return "Person [fName=" + fName + ", lName=" + lName + ", id=" + id
+ ", phone=" + phone + ", home=" + home + "]";
}
}