|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectexe.question
exe.mcQuestion
exe.XMLmcQuestion
public class XMLmcQuestion
This class allows multiple-choice questions to be displayed along with
GAIGS snapshots. It inherits the functionality of the
mcQuestion class but outputs its information in the new GAIGS
XML format.
In order to use XMLmcQuestion or any of
question's other derived classes in a script-producing program,
the script-producing program must import the package exe.
An XMLmcQuestion is added to a showfile by placing a question
reference at the end of the snapshot in which the question is to appear and
then by appending the question information to the question section at the
end of the file.
Question reference for an XMLmcQuestion:
<question_ref ref = "id"/>
Question information for an XMLmcQuestion:
<question type = "MCQUESTION" id = "id">
<question_text>The question text appears here.
</question_text>
<answer_option is_correct = "yes">The correct answer
choice appears here.
</answer_option>
<answer_option is_correct = "no">Incorrect answer
choice 1 appears
here.
</answer_option>
<answer_option is_correct = "no">Incorrect answer
choice 2 appears
here.
</answer_option>
. . .
<answer_option is_correct = "no">Incorrect answer
choice n
appears here.
</answer_option>
<question>
| Field Summary |
|---|
| Fields inherited from class exe.mcQuestion |
|---|
choices, correctChoice, correctChoiceStr |
| Fields inherited from class exe.question |
|---|
id, mustBeAsked, out, questionText |
| Constructor Summary | |
|---|---|
XMLmcQuestion(java.io.PrintWriter out,
java.lang.String id)
Constructs a new XMLmcQuestion object that is
distinguished by id and outputs its information to
out. |
|
| Method Summary | |
|---|---|
void |
insertQuestion()
Inserts the GAIGS XML <question_ref> tag for this XMLmcQuestion at the current position in the specified
PrintWriter output stream. |
void |
writeQuestionInfo()
Writes this XMLmcQuestion's information at the current
position in the specified PrintWriter output stream using
the GAIGS XML format. |
| Methods inherited from class exe.mcQuestion |
|---|
addChoice, animalInsertQuestion, animalWriteQuestionInfo, setAnswer, setAnswer, shuffle |
| Methods inherited from class exe.question |
|---|
getID, setMustBeAsked, setQuestionText |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLmcQuestion(java.io.PrintWriter out,
java.lang.String id)
XMLmcQuestion object that is
distinguished by id and outputs its information to
out.
out - Specifies the output stream to which this
XMLmcQuestion should perform its write
operations.id - Gives this XMLmcQuestion a String
that can be used to uniquely identify it from other
question objects in a collection.| Method Detail |
|---|
public void insertQuestion()
XMLmcQuestion at the current position in the specified
PrintWriter output stream.
insertQuestion in class mcQuestionpublic void writeQuestionInfo()
XMLmcQuestion's information at the current
position in the specified PrintWriter output stream using
the GAIGS XML format.
This method is called by the XMLquestionCollection's
writeQuestionsAtEOSF() method and likely will never have to
be invoked explicitly.
writeQuestionInfo in class mcQuestion
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||