Score(){ returnscore;?}?publicvoidsetScore(intscore){ this.score=score;?}?publicvoidsortByScore(Student[]students){ intmax=students[0].score; for(inti=0;i<students.length;i++){ for(intj=0;j<students.length;j++){ if(students[i].getScore()>students[j].getScore()){ Studentb=students[i]; students[i]=students[j]; students[j]=b; } } } System.out.println("按成绩排序后的结果如下:"); for(inti=0;i<students.length;i++){ System.out.print(students[i].getName()+""+students[i].getNumber()+""+students[i].getScore()); System.out.println(); }?}}lassStudentTest{?publicstaticvoidmain(String[]args){ Students1=newStudent("Kitty","0000001",70); Students2=newStudent("Dingdang","0000002",85); Students3=newStudent("Tom","0000003",60); Student[]students=newStudent[]{s1,s2,s3}; Students=newStudent(); s.sortByScore(students);?}}