fix(student): add hashCode check to equals

This commit is contained in:
Артющик Анастасия
2026-08-24 18:36:58 +03:00
parent 4e53eb03f9
commit 5e71d27885
@@ -51,8 +51,12 @@ public class Student {
if (obj == null || getClass() != obj.getClass()) {
return false;
}
if (this.hashCode() != obj.hashCode()) {
return false;
}
Student student = (Student) obj;
return Double.compare(averageGrade, student.averageGrade) == 0