TP06 - TP07 début

This commit is contained in:
2022-03-07 17:26:31 +01:00
parent 975abd0e19
commit a5665f3b23
24 changed files with 175 additions and 2 deletions

Binary file not shown.

View File

@@ -37,6 +37,6 @@ public class Segment {
}
public boolean equals(Segment s2) {
return this.start == s2.start && this.end == s2.end;
return (this.start.equals(s2.start) && this.end.equals(s2.end));
}
}

View File

@@ -3,6 +3,6 @@ public class TestSegment {
Segment s = new Segment(0, 10, 10, 0);
Segment s2 = new Segment(0, 10, 10, 0);
System.out.println(s.equals(s2));
}
}