complete all parts

This commit is contained in:
2026-05-25 11:20:21 +03:30
parent 83746b88f6
commit 2c98b0a522
11 changed files with 114 additions and 78 deletions
+4 -19
View File
@@ -40,31 +40,16 @@ public class Student {
@Override
public int hashCode() {
// TODO:
// Return custom hash
// Example:
// return id % 97;
return 0;
return this.id % 97;
}
@Override
public boolean equals(Object obj) {
// TODO:
if (obj == null || getClass() != obj.getClass()) return false;
// Step 1:
// Check null
// Step 2:
// Convert obj to Student
// Step 3:
// Compare IDs
return false;
Student s = (Student) obj;
return s.id == this.id;
}
@Override