parent
5394c081ef
commit
e5a416c060
Binary file not shown.
@ -1,37 +0,0 @@
|
||||
package mathlearning.service.MultipleChoiceGenerator;
|
||||
|
||||
import mathlearning.model.User;
|
||||
|
||||
public class MultipleChoiceGeneratorTest {
|
||||
public static void main(String[] args) {
|
||||
// 创建一个模拟用户
|
||||
User testUser = new User();
|
||||
testUser.setType("小学"); // 可以分别测试"小学"、"初中"、"高中"
|
||||
|
||||
// 测试生成10道题目
|
||||
int questionCount = 10;
|
||||
MultipleChoiceGenerator generator = new MultipleChoiceGenerator(questionCount, testUser);
|
||||
|
||||
// 获取生成的题目、答案和选项
|
||||
String[] questions = generator.GetQuestionList();
|
||||
String[] answers = generator.GetAnswerList();
|
||||
String[] choices = generator.GetChoiceList();
|
||||
|
||||
// 输出测试结果
|
||||
System.out.println("=== 数学题目生成测试 ===");
|
||||
System.out.println("用户类型: " + testUser.getType());
|
||||
System.out.println("生成题目数量: " + questionCount);
|
||||
System.out.println();
|
||||
|
||||
for (int i = 0; i < questions.length; i++) {
|
||||
System.out.println("题目 " + (i + 1) + ": " + questions[i]);
|
||||
System.out.println("答案: " + answers[i]);
|
||||
System.out.println("选项:");
|
||||
String[] choiceArray = choices[i].split("\n");
|
||||
for (int j = 0; j < choiceArray.length; j++) {
|
||||
System.out.println(" " + (char)('A' + j) + ". " + choiceArray[j]);
|
||||
}
|
||||
System.out.println("----------------------------------------");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,3 @@
|
||||
Manifest-Version: 1.0
|
||||
Main-Class: mathlearning.App
|
||||
|
||||
Loading…
Reference in new issue