|
|
@@ -0,0 +1,31 @@
|
|
|
+package cn.seecoder.judgement.vo.question;
|
|
|
+
|
|
|
+import cn.seecoder.bok.common.vo.QuestionVO;
|
|
|
+import lombok.Data;
|
|
|
+import lombok.EqualsAndHashCode;
|
|
|
+import lombok.NonNull;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author xst
|
|
|
+ * <p>
|
|
|
+ * updated by cst
|
|
|
+ */
|
|
|
+@EqualsAndHashCode(callSuper = true)
|
|
|
+@Data
|
|
|
+public class MultipleChoiceQuestionVO extends BaseQuestionVO {
|
|
|
+ private String answer;
|
|
|
+
|
|
|
+ public MultipleChoiceQuestionVO(@NonNull QuestionVO questionVO, boolean withAnswer) {
|
|
|
+ super(questionVO);
|
|
|
+
|
|
|
+ if (withAnswer) {
|
|
|
+ this.answer = questionVO.getAnswer();
|
|
|
+ this.analysis = questionVO.getAnalysis();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean pass(Object answer) {
|
|
|
+ return this.answer.equals(String.valueOf(answer));
|
|
|
+ }
|
|
|
+}
|