student.java
来自「< ProJavaProgrammingSecondEdition>」· Java 代码 · 共 23 行
JAVA
23 行
public class Student {
protected TestScore[] testScores;
protected String name;
public String getName() {
return name;
}
public TestScore[] getTestScores() {
return testScores;
}
public int getAverage() {
int total = 0;
for (int i = 0; i < testScores.length; i++) {
total += testScores[i].getPercentCorrect();
}
return total / testScores.length;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?