⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 localquestion.java

📁 老外的在线考试
💻 JAVA
字号:
/* * SchoolEJB - CyberDemia's library of EJBs for educational related services. * Copyright (C) 2003 CyberDemia Research and Services * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU * Library General Public License for more details. *  * You should have received a copy of the GNU Library General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA  02111-1307, USA. * * See the COPYING file located in the top-level-directory of * the archive of this library for complete text of license. */package com.cyberdemia.school;import javax.ejb.*;/** *  * LocalQuestion is the local interface to a QuestionBean  * that represents a multiple-choice question. *  * @author Alexander Yap */public interface LocalQuestion extends EJBLocalObject{	/**	 * Gets the unique ID of this Question.	 * @return Unique ID	 */	public String getId();	/**	* Gets the name intended for display in user interface.	* @return Name of this question.	*/	public String getName();	/**	* Sets the name intended for display in user interface.	* @param name Name of this question.	*/	public void setName(String name);	/**	* Gets the content of this question. The content is the main 	* body of the question.	* @return Content of this question.	*/	public String getContent();	/**	* Sets the content of this question. The content is the main 	* body of the question.	* @param content Content of this question.	*/	public void setContent(String content);	/**	* Gets the answer for this question. 	* The answer is an Integer index that refers to one of the 	* answer choices.	* @return Answer for this question. 	*/	public Integer getAnswer();	/**	* Sets the answer for this question. 	* The answer is an Integer index that refers to one of the 	* answer choices.	* @param ans Answer for this question. 	*/	public void setAnswer( Integer answer);	/**	* Add an answer choice. 	* @param choice Answer choice.	*/	public void addAnswerChoice(LocalAnswerChoice choice);		/**	* Sets the text of an existing answer choice. 	* @param index  Index of answer choice to set.	* @param text  Text to set.	*/	public void setAnswerChoiceText(int index, String text);	/**	* Gets the answer choices as array of LocalAnswerChoice interfaces, sorted based on their indices. 	* The answer refers to the index to this array.	* @return Array of answer choices.	*/	public LocalAnswerChoice[] getAnswerChoices();	/**	* Gets the hint for this question.	* @return Hint for this question. 	*/	public String getHint();		/**	* Sets the hint for this question.	* @param hint Hint for this question. 	*/	public void setHint( String hint);	/**	* Gets the explanation for this question.	* It is a persistent attribute.	* @return Explanation for this question.	*/	public String getExplanation();	/**	* Sets the explanation for this question.	* It is a persistent attribute.	* @param explain Explanation for this question.	*/	public void setExplanation( String explain);	/**	 * Sets the timestamp in milliseconds when this question was last modified.	 * @param lastModified Timestamp when this question was last modified.	 */	public void setLastModifiedMillis(long lastModified);		/**	 * Gets the timestamp in milliseconds when this question was last modified.	 * @return Timestamp when this question was last modified.	 */	public long getLastModifiedMillis();		/**	* Gets the difficulty of this question.	* @return Difficulty of this question.	*/	public DifficultyEnum getDifficulty();	/**	* Sets the difficulty of this question.	* @param diff Difficulty of this question.	*/	public void setDifficulty(DifficultyEnum diff);	/**	 * Gets the score for this question. 	 * This score is awarded to the user for a correct answer.	 * @return Score for this question.	 */	public int getScore();	/**	 * Sets the score for this question. 	 * This score is awarded to the user for a correct answer.	 * @param score Score for this question.	 */	public void setScore(int score);	/**	* Gets the ID of the test that this question is currently assigned to.	* @return Test ID, or empty String if this question not assigned to any test.	*/	public String getTestId();	/**	* Sets the test ID for this question.	* @param testId Test ID.	*/	public void setTestId(String testId);	/**	* Sets the allocated time limit (in seconds) for this question.	* @param limit  Time limit in seconds, or 0 (or negative) for no time limit.	*/	public void setTimeLimitSeconds(int limit);	/**	* Gets the allocated time limit (in seconds) for this question.	* @return  Time limit in seconds, or 0 (or negative) for no time limit.	*/	public int getTimeLimitSeconds();	/**	 * Checks if this question is active. An active question	 * may be allocated to a test, editted and used.	 * An inactive question may be considered to be logically removed	 * from the system, but is kept in the database to maintain 	 * consistency in reporting and historical logging.	 * @return true if this question is active, false if inactive.	 */	public boolean isActive();		/**	 * Actives this question, so that it may be editted and used.	 * This method may perform some checks first to ensure that this question	 * can be safely activated.	 * @return true if this question is activated, false if it is not (either a problem or it is already active)	 */	public boolean activate();	/**	 * Deactives this question, after which it may be considered to be logically removed	 * from the system.	 * This method may perform some checks first to ensure that this question	 * can be safely deactivated.	 * @return true if this question is deactivated, false if it is not (either a problem or it is already inactive)	 */	public boolean deactivate();	/**	* Checks the specified response to determine if it	* matches the answer for this question.	* @param response  The response to check.	* @return true if response matches the answer, otherwise false.	*/	public boolean checkResponse( Integer response);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -