scorecaculator.java~1~

来自「java在线考试例子代码」· JAVA~1~ 代码 · 共 34 行

JAVA~1~
34
字号
package testovernet;public class ScoreCaculator {    protected final double TOTALSCORE=100;    protected double studentScore=0;    public ScoreCaculator() {    }    public double scoreCaculate(int quesAmount,                               Question[] paperWithStandardAnswer,                               Question[] paperAfterExamFromStudent) {        double singleScore=TOTALSCORE/quesAmount;        for(int i=0;i<quesAmount;i++) {            String standardAnswer=paperWithStandardAnswer[i].standardAnswer;            String studentAnswer=paperAfterExamFromStudent[i].studentAnswer;            if(standardAnswer.equals(studentAnswer)) {                studentScore+=singleScore;            }            return studentScore;        }    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?