Compare commits

..

No commits in common. 'main' and 'develop' have entirely different histories.

@ -1,35 +1,58 @@
<<<<<<< HEAD
package entity; package entity;
/** /**
*
*
*
*/ */
public class Question { public class Question {
private final int number; // 题号 private final int number; // 题号
private final String content; // 题目内容(数学表达式) private final String content; // 题目内容(数学表达式)
/** /**
*
* @param number 1 @param number 1
* @param content @param content
*/ */
=======
package main.java.entity;
//题目类定义
public class Question {
private int number;
private String content;
>>>>>>> 93d8b771666e4fb2ee7477c19dcf6f4fb1eec045
public Question(int number, String content) { public Question(int number, String content) {
this.number = number; this.number = number;
this.content = content; this.content = content;
} }
<<<<<<< HEAD
// Getter方法 // Getter方法
public int getNumber() { return number; } public int getNumber() { return number; }
public String getContent() { return content; } public String getContent() { return content; }
/** /**
* toString toString
* . .
* @return @return
*/ */
@Override @Override
public String toString() { public String toString() {
return number + ". " + content; return number + ". " + content;
} }
} }
=======
//获取题目信息
public int getNumber() {return number;}
public String getContent() {return content;}
@Override
//重写toString方法返回number与content
public String toString() {
return number + " " + content;
}
}
>>>>>>> 93d8b771666e4fb2ee7477c19dcf6f4fb1eec045

@ -1,29 +1,49 @@
<<<<<<< HEAD
package entity; package entity;
/** /**
*
* // //
* final final
*/ */
public class User { public class User {
private final String username; // 用户名 private final String username; // 用户名
private final String password; // 密码 private final String password; // 密码
private final String type; // 用户类型:小学、初中、高中 private final String type; // 用户类型:小学、初中、高中
/** /**
*
* @param username @param username
* @param password @param password
* @param type @param type
*/ */
=======
package main.java.entity;
//用户类定义
public class User {
private String username;
private String password;
private String type;
>>>>>>> 93d8b771666e4fb2ee7477c19dcf6f4fb1eec045
public User(String username, String password, String type) { public User(String username, String password, String type) {
this.username = username; this.username = username;
this.password = password; this.password = password;
this.type = type; this.type = type;
} }
<<<<<<< HEAD
// Getter方法 // Getter方法
public String getUsername() { return username; } public String getUsername() { return username; }
public String getPassword() { return password; } public String getPassword() { return password; }
public String getType() { return type; } public String getType() { return type; }
} }
=======
//获得用户信息
public String getUsername() {return username;}
public String getPassword() {return password;}
public String getType() {return type;}
}
>>>>>>> 93d8b771666e4fb2ee7477c19dcf6f4fb1eec045

@ -1,21 +1,22 @@
<<<<<<< HEAD
package factory; package factory;
/** /**
*
* 使 使
*
*/ */
public class QuestionFactory { public class QuestionFactory {
/** /**
*
* @param type @param type
* @return @return
* @throws IllegalArgumentException @throws IllegalArgumentException
*/ */
public static QuestionGenerator createGenerator(String type) { public static QuestionGenerator createGenerator(String type) {
switch (type) { switch (type) {
case "小学": case "小学":
return new generator.ElementaryQuestionGenerator(); return new generator.PrimaryQuestionGenerator();
case "初中": case "初中":
return new generator.JuniorQuestionGenerator(); return new generator.JuniorQuestionGenerator();
case "高中": case "高中":
@ -24,4 +25,10 @@ public class QuestionFactory {
throw new IllegalArgumentException("不支持的题目类型: " + type); throw new IllegalArgumentException("不支持的题目类型: " + type);
} }
} }
} =======
package main.java.factory;
public class QuestionFactory {
>>>>>>> 93d8b771666e4fb2ee7477c19dcf6f4fb1eec045
}

@ -1,30 +1,37 @@
<<<<<<< HEAD
package factory; package factory;
import entity.Question; import entity.Question;
import java.util.List; import java.util.List;
/** /**
*
*
*
*/ */
public interface QuestionGenerator { public interface QuestionGenerator {
/** /**
*
* @param count @param count
* @return @return
*/ */
List<Question> generateQuestions(int count); List<Question> generateQuestions(int count);
/** /**
*
* @return @return
*/ */
Question generateQuestion(); Question generateQuestion();
/** /**
*
* @return // @return //
*/ */
String getType(); String getType();
} }
=======
package main.java.factory;
public class QuestionGenerator {
}
>>>>>>> 93d8b771666e4fb2ee7477c19dcf6f4fb1eec045

@ -1,4 +1,4 @@
<<<<<<< HEAD
package generator; package generator;
import entity.Question; import entity.Question;
@ -236,4 +236,9 @@ public class JuniorQuestionGenerator implements QuestionGenerator {
return expression.toString(); return expression.toString();
} }
} }
=======
package main.java.generator;
public class JuniorQuestionGenerator {
}
>>>>>>> 93d8b771666e4fb2ee7477c19dcf6f4fb1eec045

@ -1,4 +1,4 @@
<<<<<<< HEAD
package generator; package generator;
import entity.Question; import entity.Question;
@ -200,4 +200,9 @@ public class PrimaryQuestionGenerator implements QuestionGenerator {
return expression.toString(); return expression.toString();
} }
} }
=======
package main.java.generator;
public class PrimaryQuestionGenerator {
}
>>>>>>> 93d8b771666e4fb2ee7477c19dcf6f4fb1eec045

@ -1,4 +1,4 @@
<<<<<<< HEAD
package generator; package generator;
import entity.Question; import entity.Question;
@ -226,4 +226,9 @@ public class SeniorQuestionGenerator implements QuestionGenerator {
return result; return result;
} }
} }
=======
package main.java.generator;
public class SeniorQuestionGenerator {
}
>>>>>>> 93d8b771666e4fb2ee7477c19dcf6f4fb1eec045

@ -1,4 +1,4 @@
<<<<<<< HEAD
package service; package service;
import entity.Question; import entity.Question;
@ -66,5 +66,9 @@ public class FileService {
// TODO: 实现完整的查重逻辑 // TODO: 实现完整的查重逻辑
return false; return false;
} }
=======
package main.java.service;
public class FileService {
>>>>>>> 93d8b771666e4fb2ee7477c19dcf6f4fb1eec045
} }

@ -1,4 +1,4 @@
<<<<<<< HEAD
package service; package service;
import entity.Question; import entity.Question;
@ -51,5 +51,9 @@ public class QuestionService {
public boolean validateQuestionCount(int count) { public boolean validateQuestionCount(int count) {
return validationService.isValidQuestionCount(count); return validationService.isValidQuestionCount(count);
} }
=======
package main.java.service;
public class QuestionService {
>>>>>>> 93d8b771666e4fb2ee7477c19dcf6f4fb1eec045
} }

@ -1,4 +1,4 @@
<<<<<<< HEAD
package service; package service;
import entity.User; import entity.User;
@ -56,4 +56,9 @@ public class UserService {
return null; return null;
} }
} }
=======
package main.java.service;
public class UserService {
}
>>>>>>> 93d8b771666e4fb2ee7477c19dcf6f4fb1eec045

@ -1,4 +1,4 @@
<<<<<<< HEAD
package service; package service;
/** /**
@ -34,5 +34,9 @@ public class ValidationService {
public String extractTypeFromCommand(String command) { public String extractTypeFromCommand(String command) {
return command.replace("切换为", ""); return command.replace("切换为", "");
} }
=======
package main.java.service;
public class ValidationService {
>>>>>>> 93d8b771666e4fb2ee7477c19dcf6f4fb1eec045
} }

Loading…
Cancel
Save