Repository navigation
Expand file tree
/
Copy pathPerson.java
More file actions
70 lines (54 loc) · 1.53 KB
/
Copy pathPerson.java
File metadata and controls
70 lines (54 loc) · 1.53 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
public class Person {
private String first_name;
private String last_name;
private String cell_number;
private int month;
private int day;
public Person() {
}
public Person(String first_name, String last_name) {
this.first_name = first_name;
this.last_name = last_name;
}
public Person(String first_name, String last_name, String cell_number, int month, int day) {
this(first_name, last_name);
this.cell_number = cell_number;
this.month = month;
this.day = day;
}
public void setDay(int day) {
this.day = day;
}
public int getDay() {
return day;
}
public void setMonth(int month) {
this.month = month;
}
public int getMonth() {
return month;
}
public void setCell_number(String cell_number) {
this.cell_number = cell_number;
}
public String getCell_number() {
return cell_number;
}
public void setFirst_name(String first_name) {
this.first_name = first_name;
}
public String getFirst_name() {
return first_name;
}
public void setLast_name(String last_name) {
this.last_name = last_name;
}
public String getLast_name() {
return last_name;
}
@Override
public String toString() {
return getFirst_name() + "\t\t" + getLast_name() + "\t\t\t" + getCell_number() + "\t" + getMonth() + "/"
+ getDay();
}
}