package com.sf.day13;

import java.util.Comparator;

public class StudentScoreComparator implements Comparator {

    @Override
    public int compare(Object o1, Object o2) {
        Student stu1 = (Student) o1;
        Student stu2 = (Student) o2;
        if(stu1.getScore() > stu2.getScore() ){
            return 1;
        }else if (stu1.getScore() < stu2.getScore()){
            return -1;
        }
        return 0;
    }
}
