|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectexe.question
exe.fibQuestion
public class fibQuestion
This class extends question to provide support for
fill-in-the-blank questions.
In order to use fibQuestion or any of question's
other derived classes in a script-producing program, the script-producing
program must import the package exe.
A fibQuestion 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 fibQuestion:
FIBQUESTION id
Question information for a fibQuestion:
FIBQUESTION id
The question text appears here.
ENDTEXT
ANSWER
Correct answer possibility 1 appears here.
Correct answer possibility 2 appears here.
. . .
Correct answer possibility n appears here.
ENDANSWER
| Field Summary | |
|---|---|
protected java.util.Vector<java.lang.String> |
correctAnswers
Holds the possible correct answers to this question. |
| Fields inherited from class exe.question |
|---|
id, mustBeAsked, out, questionText |
| Constructor Summary | |
|---|---|
fibQuestion(java.io.PrintWriter out,
java.lang.String id)
Constructs a new fibQuestion 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(java.lang.String answer)
Sets one of the possible correct answers for this fibQuestion. |
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 java.util.Vector<java.lang.String> correctAnswers
String objects and
are compared to the text entered into the question window to determine
if the user's answer is correct.
| Constructor Detail |
|---|
public fibQuestion(java.io.PrintWriter out,
java.lang.String id)
fibQuestion object that is distinguished
by id and outputs its information to out.
out - Specifies the output stream to which this
fibQuestion should perform its write operations.id - Gives this fibQuestion 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(java.lang.String answer)
fibQuestion.
This possible correct answer is added to the Vector of
correct answers. When the user enters an answer, the text will be
compared with all the possible correct answers in the list to determine
if the user's answer is correct.
answer - Specifies the text of one of the possible correct answers
to the fibQuestion. Note that this
String must be identical to the answer that
the user is required to enter into the question window's
text field.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 | |||||||