设某一个班共有N(N=20)名学生,期末考试5门课程,请编一程序评定学生的奖学金,要求打印输出一、二等奖学金学生的学号、姓名和各门课成绩。(奖学金评定标准是:总成绩超过全班总平成绩20%发给一个奖学金,超过全班总平成绩10%发给二个奖学金。)
public static void main(String[] args) {
Student a = new Student();
a.average();
a.aver();
a.shu();
a.cout1();
a.cout2();
}
}
class Student {
private int[] num = new int[20];
private int[][] score = new int[20][5];
private int[] ave = new int[20];
private int avera;
public Student() {
for (int i = 0; i < 20; i++) {
num[i] = i + 2019214901;
for (int j = 0; j < 5; j++)
score[i][j] = (int) (40 + Math.random() * 60);
}
}
public int[] average() {