-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEmployee.java
More file actions
65 lines (39 loc) · 989 Bytes
/
Copy pathEmployee.java
File metadata and controls
65 lines (39 loc) · 989 Bytes
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
public class Employee implements Comparable<Employee> {
private int empID;
private String empName;
private String empDept;
public Employee() {
}
public Employee(int empID, String empName, String empDept) {
this.empID = empID;
this.empName = empName;
this.empDept = empDept;
}
public int getEmpID() {
return empID;
}
public void setEmpID(int empID) {
this.empID = empID;
}
public String getEmpName() {
return empName;
}
public void setEmpName(String empName) {
this.empName = empName;
}
public String getEmpDept() {
return empDept;
}
public void setEmpDept(String empDept) {
this.empDept = empDept;
}
@Override
public String toString() {
//return "Not allowed";
return "[empID=" + empID + ", empName=" + empName + ", empDept=" + empDept + "]";
}
@Override
public int compareTo(Employee o) {
return this.empName.compareTo(o.empName);
}
}