choicequestion.java

来自「考试系统」· Java 代码 · 共 45 行

JAVA
45
字号
package paper;

/**
 * @author SpiritRain
 *
 * Choice Question,an implementation of AbstractQuestion 
 * 
 */
public class ChoiceQuestion extends AbstractQuestion {

	/**
	 * Create a new Choice Question and initiate variables
	 * @param qutestionText question string to discribe the question
	 * @param answers answer of the question
	 * @param hint hint of the question
	 * @param score score of the question
	 * @param diff difficulty of the question
	 *   
	 */
	public ChoiceQuestion(
		String qutestionText,
		AbstractAnswerSet answers,
		String hint,
		int score,
		int diff) {
		super(qutestionText, answers, hint, score, diff);
	}

	/**
	 * discribe the answer
	 * @param index index number of the answer text
	 * @return answer text to discribe the answer
	 */
	public String getAnswerText(int index) {
		return ((ChoiceASet) answers).getAnswerText(index);
	}
	
	/*
	 * @see paper.AbstractQuestion#getType()
	 */
	public int getType() {
		return CHOICE;
	}
}

⌨️ 快捷键说明

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