exe
Class question

java.lang.Object
  extended by exe.question
Direct Known Subclasses:
fibQuestion, mcQuestion, msQuestion, tfQuestion

public abstract class question
extends java.lang.Object

This is the abstract base class that defines the essential data and methods of a question object. A question object encapsulates the state information needed to uniquely identify the question, print the question's information to a PrintWriter output stream, and store the text of the question.

In order to use the question support given by question and its derived classes in a script-producing program, the package exe must be imported in the script-producing program.

Author:
? (original author), Ben Tidman (original comments), Andrew Jungwirth (editing and Javadoc comments)

Field Summary
protected  java.lang.String id
          Defines the String value that is used to uniquely identify this question from other question objects in a collection.
protected  boolean mustBeAsked
          Specifies whether this question is marked as must be asked when probablistic questioning is used.
protected  java.io.PrintWriter out
          Specifies the PrintWriter output stream to which the question is to perform its write operations.
protected  java.lang.String questionText
          Stores the text that is displayed in the question window for this question.
 
Constructor Summary
question(java.io.PrintWriter out, java.lang.String id)
          Constructs a new question object that is distinguished by id and outputs its information to out.
 
Method Summary
abstract  void animalInsertQuestion()
          Writes a reference to this question at the current position in the specified PrintWriter output stream using the ANIMAL question reference format.
abstract  void animalWriteQuestionInfo()
          Writes this question's information at the current position in the specified PrintWriter output stream using the ANIMAL question format.
 java.lang.String getID()
          Returns this question's id.
abstract  void insertQuestion()
          Writes a reference to this question at the current position in the specified PrintWriter output stream using the GAIGS question reference format.
 void setMustBeAsked(boolean flag)
          Specifies whether this question is mark as must be asked when probablistic questioning is used.
 void setQuestionText(java.lang.String questionText)
          Sets the text that is displayed in the question pop-up window when this question is included in a showfile.
abstract  void writeQuestionInfo()
          Writes this question's information at the current position in the specified PrintWriter output stream using the GAIGS question format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

id

protected java.lang.String id
Defines the String value that is used to uniquely identify this question from other question objects in a collection.


out

protected java.io.PrintWriter out
Specifies the PrintWriter output stream to which the question is to perform its write operations.


questionText

protected java.lang.String questionText
Stores the text that is displayed in the question window for this question.


mustBeAsked

protected boolean mustBeAsked
Specifies whether this question is marked as must be asked when probablistic questioning is used. Default is false.

Constructor Detail

question

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

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

setQuestionText

public void setQuestionText(java.lang.String questionText)
Sets the text that is displayed in the question pop-up window when this question is included in a showfile.

Parameters:
questionText - Specifies the text to be displayed in the question window when this question is asked.

setMustBeAsked

public void setMustBeAsked(boolean flag)
Specifies whether this question is mark as must be asked when probablistic questioning is used.

Parameters:
flag - the new value for mustBeAsked.

getID

public java.lang.String getID()
Returns this question's id.

Returns:
Gives the String value used to uniquely identify this question.

writeQuestionInfo

public abstract void writeQuestionInfo()
Writes this question's information at the current position in the specified PrintWriter output stream using the GAIGS question format.


animalWriteQuestionInfo

public abstract void animalWriteQuestionInfo()
Writes this question's information at the current position in the specified PrintWriter output stream using the ANIMAL question format.


insertQuestion

public abstract void insertQuestion()
Writes a reference to this question at the current position in the specified PrintWriter output stream using the GAIGS question reference format.


animalInsertQuestion

public abstract void animalInsertQuestion()
Writes a reference to this question at the current position in the specified PrintWriter output stream using the ANIMAL question reference format.