ukacgla_HTMLMulti
Class TestEngine
java.lang.Object
|
+--ukacgla_HTMLMulti.TestEngine
- public class TestEngine
- extends java.lang.Object
TestEngine holds ALL the the questions for a session.
It reads the input file at testURL, and while inStream is not null, uses a StringTokenizer to read the file.
It then creates a new question URL from testURL plus txt read from inStream (relative URL construction).
It then creates a new answer URL from testURL plus txt read from inStream (relative URL construction).
It then creates a new TestItem and adds it to the Vector testVector.
Test vector is then cloned to currVector to prevent a concurrent access exception.
The cloned Vector currVector is then randomised to ensure options are presented in different order each time.
Constructor Summary |
TestEngine(java.net.URL testURL,
int numQuestions)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestEngine
public TestEngine(java.net.URL testURL,
int numQuestions)
getNextTest
protected TestItem getNextTest(int n)
- Returns TestItem at specified index.
Throws IndexOutOfBounds exception if argument exceeds Vector size.
getNumQuestions
protected int getNumQuestions()
- Return number of TestItems in this TestItem