-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPair.java
More file actions
51 lines (38 loc) · 1.09 KB
/
Pair.java
File metadata and controls
51 lines (38 loc) · 1.09 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
import java.util.Comparator;
/**
* Kien Do 300163370
* CSI2510 - Structures de données et algorithms
*
* Devoir Programmation
*/
public class Pair implements Comparable<Pair> {
private int employerRanking;
private int student;
public Pair() {
}
public Pair(int employerRanking, int student) {
this.employerRanking = employerRanking;
this.student = student;
}
/** ============= Méthodes ============= */
public int getEmployerRanking() {
return employerRanking;
}
public void setEmployerRanking(int employerRanking) {
this.employerRanking = employerRanking;
}
public int getStudent() {
return student;
}
public void setStudent(int student) {
this.student = student;
}
@Override
public String toString() {
return "(" + employerRanking + ", " + student + ")";
}
@Override
public int compareTo(Pair otherEmployer) {
return Integer.compare(this.employerRanking, otherEmployer.employerRanking);
}
}