刘欣睿 20251011 1923 #2
Closed
hnu202326010225
wants to merge 0 commits from chenyingjiang_branch into develop
@ -0,0 +1,38 @@
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target/
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea/modules.xml
|
||||
.idea/jarRepositories.xml
|
||||
.idea/compiler.xml
|
||||
.idea/libraries/
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### Eclipse ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
|
||||
### Mac OS ###
|
||||
.DS_Store
|
||||
@ -0,0 +1,3 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
@ -0,0 +1 @@
|
||||
UserService.java
|
||||
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||
<component name="MavenProjectsManager">
|
||||
<option name="originalFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/pom.xml" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_23" default="true" project-jdk-name="23" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/out" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@ -0,0 +1,17 @@
|
||||
[ {
|
||||
"username" : "LXR",
|
||||
"email" : "2759462569@qq.com",
|
||||
"passwordHash" : "$2a$12$AiupZKqpZMXvstX6XYNGUuBDZOMdzqXy/ADaYzurUYatM293Lbxii",
|
||||
"registrationDate" : [ 2025, 10, 11, 19, 40, 59, 177105400 ],
|
||||
"verificationCode" : "371978",
|
||||
"verified" : true,
|
||||
"type" : "高中"
|
||||
}, {
|
||||
"username" : "小鱼",
|
||||
"email" : "1280556515@qq.com",
|
||||
"passwordHash" : "$2a$12$dbNwBK6NBj7mXU6YzNMAweTMhD9NOxsjPGzW2SfIM.QvGdWt7Lyvy",
|
||||
"registrationDate" : [ 2025, 10, 10, 11, 7, 5, 853200500 ],
|
||||
"verificationCode" : "688201",
|
||||
"verified" : true,
|
||||
"type" : "高中"
|
||||
} ]
|
||||
Binary file not shown.
@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
|
||||
http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.mathlearning</groupId>
|
||||
<artifactId>math-learning-app</artifactId>
|
||||
<version>1.0.0</version>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- JavaMail for email verification -->
|
||||
<dependency>
|
||||
<groupId>com.sun.mail</groupId>
|
||||
<artifactId>javax.mail</artifactId>
|
||||
<version>1.6.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- JSON processing -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<version>2.15.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<version>2.15.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.datatype</groupId>
|
||||
<artifactId>jackson-datatype-jsr310</artifactId>
|
||||
<version>2.15.2</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Password hashing -->
|
||||
<dependency>
|
||||
<groupId>at.favre.lib</groupId>
|
||||
<artifactId>bcrypt</artifactId>
|
||||
<version>0.9.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
@ -0,0 +1,37 @@
|
||||
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("----------------------------------------");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,3 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
Main-Class: mathlearning.App
|
||||
|
||||
Loading…
Reference in new issue