public int compareTo(Student other) { if (score == other.getScore()) return name.compareTo(other.getName()); return other.getScore() - score; }