Methods Summary |
---|
public int | getAns()
return correct;
|
java.lang.String | getAnsText(int i)
return ans[i];
|
public int | getCount()Get the number of questions.
return getNumAnswers();
|
public int | getNumAnswers()Get the number of questions.
return ans.length;
|
int | getObjective()
return objective;
|
java.lang.String | getQText()
return question;
|
public void | setAns(int i, boolean notify)
if (i<0 || i>=getCount())
throw new IllegalArgumentException("Q.setAns: Count " + i + " invalid");
correct = i;
setChanged();
// if (notify)
// notifyObservers(new QChangeEvent(this,
// QChangeEvent.CHANGE_ANSWER_NUMBER, i, null));
|
void | setAnsText(int i, java.lang.String s, boolean notify)
if (i<0 || i>=getCount())
throw new IllegalArgumentException("Q.setAnsText: Count " + i + " invalid");
ans[i] = s;
setChanged();
// if (notify)
// notifyObservers(new QChangeEvent(this,
// QChangeEvent.CHANGE_ANSWER_TEXT, i, s));
|
void | setObjective(int i)
objective = i;
|
void | setQText(java.lang.String s, boolean notify)
question = s;
setChanged();
// if (notify)
// notifyObservers(new QChangeEvent(this,
// QChangeEvent.CHANGE_QUESTION_TEXT, -1, s));
|
public java.lang.String | toString()
return "Q[" + question + "]";
|