From 590c8cd364069cbcd01c3d321971e6ad6f730ecc Mon Sep 17 00:00:00 2001 From: hnu202326010302 <1677625723@qq.com> Date: Sun, 12 Oct 2025 15:42:09 +0800 Subject: [PATCH] ADD file via upload --- .../java/com/example/myapp/model/Exam.java | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/main/java/com/example/myapp/model/Exam.java diff --git a/src/main/java/com/example/myapp/model/Exam.java b/src/main/java/com/example/myapp/model/Exam.java new file mode 100644 index 0000000..a217d67 --- /dev/null +++ b/src/main/java/com/example/myapp/model/Exam.java @@ -0,0 +1,40 @@ +package com.example.myapp.model; + +import java.util.List; +import java.time.LocalDateTime; + +public class Exam { + private String gradeLevel; + private int questionCount; + private List questions; + private int score; + private LocalDateTime startTime; + private LocalDateTime endTime; + + public Exam(String gradeLevel, int questionCount, List questions) { + this.gradeLevel = gradeLevel; + this.questionCount = questionCount; + this.questions = questions; + this.startTime = LocalDateTime.now(); + this.score = -1; // -1表示未评分 + } + + // Getters and Setters + public String getGradeLevel() { return gradeLevel; } + public void setGradeLevel(String gradeLevel) { this.gradeLevel = gradeLevel; } + + public int getQuestionCount() { return questionCount; } + public void setQuestionCount(int questionCount) { this.questionCount = questionCount; } + + public List getQuestions() { return questions; } + public void setQuestions(List questions) { this.questions = questions; } + + public int getScore() { return score; } + public void setScore(int score) { this.score = score; } + + public LocalDateTime getStartTime() { return startTime; } + public void setStartTime(LocalDateTime startTime) { this.startTime = startTime; } + + public LocalDateTime getEndTime() { return endTime; } + public void setEndTime(LocalDateTime endTime) { this.endTime = endTime; } +} \ No newline at end of file