public int compareTo(Osoba other) { Student otherStudent = (Student) other; if((super.compareTo(otherStudent)) == 0){ if ((this.sredniaOcen == otherStudent.sredniaOcen)) { return 0; } else if(this.sredniaOcen < otherStudent.sredniaOcen) return -1; else return 1; } else return super.compareTo(otherStudent); }