📄 question.java
字号:
/* * Question.java * * Created on 2003年11月5日, 下午9:19 */package romulus;/** * * @author Romulus * @version 1.0 */public class Question implements RomulusNode{ /** The ident of the Question.*/ private String ident = null; /** The timing of the Question in ms. * 0 means no timing. */ private long timing = 0; /** The title of the Question.*/ private String title = null; /** The Objectives of the Question.*/ private java.util.Vector objectives = new java.util.Vector(); /** The Feedbacks of the Question.*/ private java.util.Vector feedbacks = new java.util.Vector(); /** The Question item of the Question.*/ private QuestionItem qitem = null; /** Creates a new instance of Question */ Question(String ident, long timing, String title) throws RomulusException{ if(ident == null){ throw new RomulusException(RomulusException.IdentError); } if(timing < 0){ throw new RomulusException(RomulusException.TimingError); } this.ident = ident; this.timing = timing; this.title = title; } /** Add and remove the objectives.*/ void addObjective(Objective obj){ objectives.add(obj); } boolean removeObjective(Objective obj){ return objectives.remove(obj); } /** Add and remove the feedback.*/ void addFeedback(Feedback fb){ feedbacks.add(fb); } boolean removeFeedback(Feedback fb){ return feedbacks.remove(fb); } /** Set the QuestionItem.*/ void setQuestionItem(QuestionItem qitem){ this.qitem = qitem; } /** Get the imformations. */ public String getIdent(){ return ident; } public long getTiming(){ return timing; } public String getTitle(){ return title; } public QuestionItem getItem(){ return qitem; } public java.util.Iterator objectiveIterator(){ return objectives.iterator(); } public java.util.Iterator feedbackIterator(){ return feedbacks.iterator(); } /** The method used to accept the Visitor to do something. */ public void Accept(Visitor v) throws java.sql.SQLException, RomulusException{ v.VisitQuestion(this); } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -