Testing
The testing package contains classes that pertain to the test-taking
process, such as Tests and Questions.
Inheritance
Figure 1. Inheritance in the Testing Package, Part A
Figure 2. Inheritance in the Testing Package, Part B
Design
In good object-oriented fashion, PITA Tests and Questions are
made to "do it themselves"--edit themselves, give themselves, and
grade themselves. This allows tremendous flexibility in terms of
"plug and play" objects, because a new type of Test or Question can
be made without touching the underlying PITA framework. On the
other hand, since the objects have so much responsibility, implementing
a new one is not always trivial, and since the objects need to be
graphical, making one leads to a proliferation of classes.
In particular, each new Test or Question created needs one or more
Panels that graphically display information for editing, offering, or
taking. Also, each new Question type must also include an Answer type
and a Problem type. These terms are defined briefly below:
- Test
- is a collection of Questions, along with methods to grade the
Test and order the Questions.
- TestEditPanel
- is an AWT Panel that allows the client to graphically edit the Test.
- OptionsPanel
- is an AWT Panel that displays options specific to a certain kind of
Test.
- Question
- is a class for a certain kind of question, along with methods to
grade the Question and provide information about the Question.
- QuestionEditPanel (also abbreviated QEPanel)
- is an AWT Panel that allows the client to graphically edit the Question.
- Problem
- is the part of a Question that gets sent across the network to a test
taker, usually everything except the correct answer (for security
reasons).
- ProblemPanel (also abbreviated PPanel)
- is an AWT Panel that displays the Problem for test-taking on the taker's
end.
- Answer
- is a class that contains a single possible answer to a certain Question.
Usually the Question contains a correct Answer, and the ProblemPanel
helps the taker to create a client Answer (which will be compared to
the correct one).
To assist development of new Test and Question types, well-commented
abstract parent classes--one for each of the terms above--declare the
interface needed for the new classes.
Tests
To make a new type of Test, you must derive subclasses from Test,
TestEditPanel, and OptionsPanel, and you should chang some static
variables and methods in Test. Finally, you must change
communicate.TestNameEditPanel to give clients the option to create
a test of your type. See testing.Test, in the file Test.java,
for more information.
Questions
To make a new type of Question, you must derive subclasses from Question,
QuestionEditPanel, Problem, ProblemPanel, and Answer. You must also also
change some static variables and methods in Question. See
testing.Question, in the file Question.java, for more information.
Table of Contents
Joel C. Adams (adams@calvin.edu)
Karl Voskuil (kvosku94@calvin.edu)
November 1997
Calvin College