question.java

来自「远程电子考试系统」· Java 代码 · 共 45 行

JAVA
45
字号
package org.fangsoft.testcenter.model;

public class Question {
	private Choice[] choices = new Choice[4];
	private String text;
	private int counter;
	/**
	* Constructor for Question
	*/
	public Question() {
	super();
	text = "";
	}
	public void addChoice(Choice aChoice) {
		choices[counter++] = aChoice;
		}
	public Choice getChoice(int index) {
		return choices[index];
		}
	public Choice[] getChoices() {
		return choices;
	}
	public void setChoices(Choice[] choices) {
		this.choices = choices;
	}
	public int getCount() {
		return choices.length;
		}
	public int getCounter() {
		return counter;
	}
	public void setCounter(int counter) {
		this.counter = counter;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	protected void finalize() throws Throwable {
		System.out.println("Finalize called on " + this);
		super.finalize();
		}
}

⌨️ 快捷键说明

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