diff --git a/data/张三1/2025-09-24-22-19-25.txt b/data/张三1/2025-09-24-22-19-25.txt deleted file mode 100644 index b672661..0000000 --- a/data/张三1/2025-09-24-22-19-25.txt +++ /dev/null @@ -1,19 +0,0 @@ -1. 55 + 80 - 9 * 89 = 11214 - -2. 22 + 60 = 82 - -3. 35 / 5 * 56 / 8 = 49 - -4. 69 * 60 / 24 / 8 = 21 - -5. 99 + 80 - 96 - 64 = 19 - -6. 23 - 2 = 21 - -7. 92 + 45 = 137 - -8. 17 * 100 * 97 - 83 = 164817 - -9. 10 / 3 / 3 * 62 = 62 - -10. 24 / 6 + 41 - 50 / 10 = 0 diff --git a/doc/个人项目使用大模型后人工修改代码一览表.docx b/doc/个人项目使用大模型后人工修改代码一览表.docx index 5bccf6c..30fed1d 100644 Binary files a/doc/个人项目使用大模型后人工修改代码一览表.docx and b/doc/个人项目使用大模型后人工修改代码一览表.docx differ diff --git a/out/production/TestPaperGenerationSystem/AbstractProblemGenerator.class b/out/production/TestPaperGenerationSystem/AbstractProblemGenerator.class index bfe2378..c250617 100644 Binary files a/out/production/TestPaperGenerationSystem/AbstractProblemGenerator.class and b/out/production/TestPaperGenerationSystem/AbstractProblemGenerator.class differ diff --git a/out/production/TestPaperGenerationSystem/Equation.class b/out/production/TestPaperGenerationSystem/Equation.class index 2c0c6ff..81493ee 100644 Binary files a/out/production/TestPaperGenerationSystem/Equation.class and b/out/production/TestPaperGenerationSystem/Equation.class differ diff --git a/src/AbstractProblemGenerator.java b/src/AbstractProblemGenerator.java index 0b4e87b..4c84464 100644 --- a/src/AbstractProblemGenerator.java +++ b/src/AbstractProblemGenerator.java @@ -26,11 +26,6 @@ public abstract class AbstractProblemGenerator implements IProblemGenerator { while (newProblems.size() < count) { Equation candidate = createProblem(); - // 检查最终结果是否为负数,如果是则舍弃(小学和初中常见要求) - if (candidate.getResult() < 0) { - continue; - } - String canonicalForm = candidate.toCanonicalString(); // 执行唯一性检查:既不能与历史重复,也不能与本次生成的其他题目重复 diff --git a/src/Application.java b/src/Application.java index 9b2eb6c..7a15f56 100644 --- a/src/Application.java +++ b/src/Application.java @@ -98,7 +98,7 @@ public class Application { handleGenerateProblems(count); } else { throw new InvalidInputException( - String.format("无效输入。请输入 %d-%d 之间的数字、'切换为XX' 或 '-1'。", + String.format("请输入小学、初中和高中三个选项中的一个", MIN_GENERATE_COUNT, MAX_GENERATE_COUNT)); } } catch (InvalidInputException | IOException | NumberFormatException e) { diff --git a/src/Equation.java b/src/Equation.java index 92e69cf..73d5f36 100644 --- a/src/Equation.java +++ b/src/Equation.java @@ -12,19 +12,16 @@ public class Equation { private final List operands; // 使用String以支持如 "sqrt(16)" 的形式 private final List operators; - private final int result; public Equation(List operands, List operators) { this.operands = new ArrayList<>(operands); this.operators = new ArrayList<>(operators); - this.result = calculate(); } // 为了方便,提供一个只接受整数操作数的构造函数 public Equation(List intOperands, List operators, boolean isSimple) { this.operands = intOperands.stream().map(String::valueOf).collect(Collectors.toList()); this.operators = new ArrayList<>(operators); - this.result = calculate(); } public List getOperands() { @@ -35,9 +32,6 @@ public class Equation { return Collections.unmodifiableList(operators); } - public int getResult() { - return result; - } /** * 计算方程式的结果。 @@ -75,7 +69,7 @@ public class Equation { sb.append(" ").append(operators.get(i).getSymbol()).append(" "); sb.append(operands.get(i + 1)); } - sb.append(" = ").append(result); + sb.append(" = ").append("?"); return sb.toString(); }