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

📄 question.java

📁 远程电子考试系统
💻 JAVA
字号:
package fangsoft.testcenter.model;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class Question {
	private List choices;
// private Choice[] choices=new Choice[4];
	public Question() {
		super();
		text = "";
		choices = new ArrayList();

	}

	/**
	 * Add a new Choice to the Question
	 * 
	 * @param aChoice
	 */
	public void addChoice(Choice aChoice) {
		choices.add(aChoice);
	}

	public Choice getChoice(int index) {
		if (index >= 0 && index < choices.size()) {
			return (Choice) choices.get(index);
		}
		return null;
	}

	public List getChoices() {
		return choices;
	}

	public void setChoices(List newChoices) {
		choices = newChoices;
	}

	public int getCount() {
		return choices.size();
	}

	private String text;

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public void resetAllpicks() {
		Iterator iter = choices.iterator();
		while (iter.hasNext()) {
			Choice choice = (Choice) iter.next();
			choice.setPicked(false);
		}
	}
	/*
	 * protected void finalize() throws Throwable { System.out.println("Finalize
	 * called on"+this); super.finalize(); }
	 */

}

⌨️ 快捷键说明

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