|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectexe.question
exe.tfQuestion
public class tfQuestion
This class extends question to provide support for true-false
questions.
In order to use tfQuestion or any of question's
other derived classes in a script-producing program, the script-producing
program must import the package exe.
A tfQuestion 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 a tfQuestion:
TFQUESTION id
Question information for a tfQuestion:
TFQUESTION id
The question text appears here.
ENDTEXT
ANSWER
T (if the answer is true) or F (if the answer is false).
ENDANSWER
| Field Summary | |
|---|---|
protected boolean |
correctAnswer
Stores the correct answer to this tfQuestion. |
| Fields inherited from class exe.question |
|---|
id, mustBeAsked, out, questionText |
| Constructor Summary | |
|---|---|
tfQuestion(java.io.PrintWriter out,
java.lang.String id)
Constructs a new tfQuestion object that is distinguished
by id and outputs its information to out. |
|
| Method Summary | |
|---|---|
void |
animalInsertQuestion()
Writes a reference to this question at the current position
in the specified PrintWriter output stream using the ANIMAL
question reference format. |
void |
animalWriteQuestionInfo()
Writes this question's information at the current position
in the specified PrintWriter output stream using the ANIMAL
question format. |
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 |
setAnswer(boolean answer)
Sets the correct answer to this tfQuestion. |
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 exe.question |
|---|
getID, setMustBeAsked, setQuestionText |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean correctAnswer
tfQuestion.
| Constructor Detail |
|---|
public tfQuestion(java.io.PrintWriter out,
java.lang.String id)
tfQuestion object that is distinguished
by id and outputs its information to out.
out - Specifies the output stream to which this
tfQuestion should perform its write operations.id - Gives this tfQuestion a String
that can be used to uniquely identify it from other
question objects in a collection.| Method Detail |
|---|
public void insertQuestion()
questionquestion at the current position
in the specified PrintWriter output stream using the GAIGS
question reference format.
insertQuestion in class questionpublic void animalInsertQuestion()
questionquestion at the current position
in the specified PrintWriter output stream using the ANIMAL
question reference format.
animalInsertQuestion in class questionpublic void setAnswer(boolean answer)
tfQuestion.
answer - Specifies the answer to this tfQuestion. A
value of true sets the answer to T, and a
value of false sets the answer to F.public void writeQuestionInfo()
questionquestion's information at the current position
in the specified PrintWriter output stream using the GAIGS
question format.
writeQuestionInfo in class questionpublic void animalWriteQuestionInfo()
questionquestion's information at the current position
in the specified PrintWriter output stream using the ANIMAL
question format.
animalWriteQuestionInfo in class question
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||