全文预览

运动会分数统计java 源程序

上传者:随心@流浪 |  格式:docx  |  页数:17 |  大小:16KB

文档介绍
s1[i].setShoolnum(pp[i][0].getNumSchool());Р ss1[i].setShoolscore(maleschoolscore[i]);Р }Р Р int i,j;Р School index;Р for( i=0;i<ss1.length;i++)Р for( j=i+1;j<ss1.length;j++)Р if(ss1[i].getShoolscore()<ss1[j].getShoolscore()){Р index=ss1[i];Р ss1[i]=ss1[j];Р ss1[j]=index;Р }Р Р System.out.println("按学校男团体总分排序为:");Р for(i=0;i<maleschoolscore.length;i++)Р System.out.println(ss1[i].getShoolnum()+" "+ss1[i].getShoolscore());Р Р }Р Р public void femalesort(){Р String woman="女";Р School ss1[]=new School[n];Р for(int i=0;i<ss1.length;i++)Р ss1[i]=new School();Р int femaleschoolscore[]=new int[n];Р this.divide();Р for(int i=0;i<pp.length;i++)Р for(int j=0;j<pp[i].length;j++){Р if(woman.equals(pp[i][j].getSexStudent()))Р femaleschoolscore[i]+=pp[i][j].getScore();Р }Р for(int i=0;i<ss1.length;i++)Р {

收藏

分享

举报
下载此文档