|
|
@ -25,7 +25,7 @@ public abstract class QuestionGenerator {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected int generateOperatorCount_one() {
|
|
|
|
protected int generateOperatorCount_one() {
|
|
|
|
return random.nextInt(4) + 2; // 1-5个操作符
|
|
|
|
return random.nextInt(4) + 2; // 2-5个操作符
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 检查题目是否重复
|
|
|
|
// 检查题目是否重复
|
|
|
@ -46,9 +46,9 @@ public abstract class QuestionGenerator {
|
|
|
|
return currentType;
|
|
|
|
return currentType;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 设置当前类型
|
|
|
|
// // 设置当前类型
|
|
|
|
public void setCurrentType(String type) {
|
|
|
|
// public void setCurrentType(String type) {
|
|
|
|
this.currentType = type;
|
|
|
|
// this.currentType = type;
|
|
|
|
this.generatedQuestions.clear(); // 切换类型时清空已生成题目
|
|
|
|
// this.generatedQuestions.clear(); // 切换类型时清空已生成题目
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
}
|
|
|
|
}
|