📄 fib.java
字号:
/* * FIBItem.java * * Created on 2003年11月5日, 下午9:14 */package romulus;/** * * @author Romulus * @version 1.0 */public class FIB implements QuestionItem { /** The ident of the fib question.*/ private String ident = null; /** The max chars of the fib.*/ private int maxc = 0; /** The user's answer of the fib.*/ private String answer = null; /** The content of the question item.*/ private Content cont = null; /** The correct answer of the question.*/ private String corr_answer = null; /** Creates a new instance of FIBItem */ FIB(String ident, int max, String c_ans) throws RomulusException{ if(ident == null){ throw new RomulusException(RomulusException.IdentError); } this.ident = ident; this.maxc = max; this.corr_answer = c_ans; } /** the answer is to public.*/ public void setAnswer(String ans){ this.answer = ans; } void setCorrectAnswer(String cans){ this.corr_answer = cans; } void setContent(Content c){ this.cont = c; } /** get information*/ public String getIdent(){ return this.ident; } public int getMaxchars(){ return this.maxc; } public String getCorrectAnswer(){ return this.corr_answer; } public String getAnswer(){ return this.answer; } public Content getContent(){ return this.cont; } /** * Such method is used to check the correct of the question item. */ public boolean isCorrect() { if(answer == null){ return false; } else if(answer.equals(corr_answer)){ return true; } else{ return false; } } /** The method used to accept the Visitor to do something. */ public void Accept(Visitor v) throws java.sql.SQLException, RomulusException{ v.VisitQuestionItem(this); } }
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -