exe
Class XMLfibQuestion

java.lang.Object
  extended by exe.question
      extended by exe.fibQuestion
          extended by exe.XMLfibQuestion

public class XMLfibQuestion
extends fibQuestion

This class allows fill-in-the-blank questions to be displayed along with GAIGS snapshots. It inherits the functionality of the fibQuestion class but outputs its information in the new GAIGS XML format.

In order to use XMLfibQuestion or any of question's other derived classes in a script-producing program, the script-producing program must import the package exe.

An XMLfibQuestion 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 XMLfibQuestion:

<question_ref ref = "id"/>

Question information for an XMLfibQuestion:

<question type = "FIBQUESTION" id = "id">
  <question_text>The question text appears here. </question_text>

  <answer_option is_correct = "yes">Correct answer possibility 1 appears here. </answer_option>

  <answer_option is_correct = "yes">Correct answer possibility 2 appears here. </answer_option>

  . . .

  <answer_option is_correct = "yes">Correct answer possibility n appears here. </answer_option>

<question>

Author:
Andrew Jungwirth

Field Summary
 
Fields inherited from class exe.fibQuestion
correctAnswers
 
Fields inherited from class exe.question
id, mustBeAsked, out, questionText
 
Constructor Summary
XMLfibQuestion(java.io.PrintWriter out, java.lang.String id)
          Constructs a new XMLfibQuestion 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 XMLfibQuestion at the current position in the specified PrintWriter output stream.
 void writeQuestionInfo()
          Writes this XMLfibQuestion's information at the current position in the specified PrintWriter output stream using the GAIGS XML format.
 
Methods inherited from class exe.fibQuestion
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

XMLfibQuestion

public XMLfibQuestion(java.io.PrintWriter out,
                      java.lang.String id)
Constructs a new XMLfibQuestion object that is distinguished by id and outputs its information to out.

Parameters:
out - Specifies the output stream to which this XMLfibQuestion should perform its write operations.
id - Gives this XMLfibQuestion a String that can be used to uniquely identify it from other question objects in a collection.
Method Detail

insertQuestion

public void insertQuestion()
Inserts the GAIGS XML <question_ref> tag for this XMLfibQuestion at the current position in the specified PrintWriter output stream.

Overrides:
insertQuestion in class fibQuestion

writeQuestionInfo

public void writeQuestionInfo()
Writes this XMLfibQuestion'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.

Overrides:
writeQuestionInfo in class fibQuestion