|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectexe.question
exe.tfQuestion
exe.XMLtfQuestion
public class XMLtfQuestion
This class allows true-false questions to be displayed along with GAIGS
snapshots. It inherits the functionality of the tfQuestion
class but outputs its information in the new GAIGS XML format.
In order to use XMLtfQuestion or any of
question's other derived classes in a script-producing program,
the script-producing program must import the package exe.
An XMLtfQuestion 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 XMLtfQuestion:
<question_ref ref = "id"/>
Question information for an XMLtfQuestion:
<question type = "TFQUESTION" id = "id">
<question_text>The question text appears here.
</question_text>
<answer_option is_correct = "yes">true
</answer_option>
<answer_option is_correct = "no">false
</answer_option>
<question>
| Field Summary |
|---|
| Fields inherited from class exe.tfQuestion |
|---|
correctAnswer |
| Fields inherited from class exe.question |
|---|
id, mustBeAsked, out, questionText |
| Constructor Summary | |
|---|---|
XMLtfQuestion(java.io.PrintWriter out,
java.lang.String id)
Constructs a new XMLtfQuestion 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 XMLtfQuestion at the current position in the specified
PrintWriter output stream. |
void |
writeQuestionInfo()
Writes this XMLtfQuestion's information at the current
position in the specified PrintWriter output stream using
the GAIGS XML format. |
| Methods inherited from class exe.tfQuestion |
|---|
animalInsertQuestion, animalWriteQuestionInfo, setAnswer |
| 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 XMLtfQuestion(java.io.PrintWriter out,
java.lang.String id)
XMLtfQuestion object that is
distinguished by id and outputs its information to
out.
out - Specifies the output stream to which this
XMLtfQuestion should perform its write
operations.id - Gives this XMLtfQuestion a String
that can be used to uniquely identify it from other
question objects in a collection.| Method Detail |
|---|
public void insertQuestion()
XMLtfQuestion at the current position in the specified
PrintWriter output stream.
insertQuestion in class tfQuestionpublic void writeQuestionInfo()
XMLtfQuestion'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 tfQuestion
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||