满意答案
public class Score {
4102// 记录学生的姓名
private String[]name;
// 记录分数
private int[][]1653fraction;
// 记录分数等级
private char[]grade;
// 存储数据
private void saveData() {
this.name = new String[] { "Johnson", "Aniston", "Cooper", "Gupta", "Blair" };
this.fraction = new int[][] { { 85, 83, 77, 91, 76 }, { 80, 90, 95, 93, 48 }, { 78, 81, 11, 90, 73 }, { 92, 83, 30, 69, 87 }, { 23, 45, 96, 38, 59 } };
this.grade = new char[this.name.length];
}
public Score() {
// 在构造函数中调用saveData存储数据。
this.saveData();
}
// 计算分数等级。传入一个分数,返回该分数的评分等级。
private char getGrade(int fraction) {
if (fraction > 100) {
// 100分的考卷分数居然超过了100,肯定和老师有交易,给你个X!
return 'X';