Facebook
From xD, 5 Months ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 75
  1.     public int compareTo(Osoba other)
  2.     {
  3.         Student otherStudent = (Student) other;
  4.         if((super.compareTo(otherStudent)) == 0){
  5.             if ((this.sredniaOcen == otherStudent.sredniaOcen)) {
  6.                 return 0;
  7.             }
  8.             else if(this.sredniaOcen < otherStudent.sredniaOcen) return -1;
  9.             else return 1;
  10.         } else return super.compareTo(otherStudent);
  11.     }