ukacgla_HTMLMulti
Class TestItem

java.lang.Object
  |
  +--ukacgla_HTMLMulti.TestItem

public class TestItem
extends java.lang.Object

TestItem holds ALL the the lines for a single question. TestItem is a single test, made of one question and a number of answers. Answers are built from reading a txt file located at the answerURL location. Each option to be displayed is a separate object, a TestLine object. This class reads the txt file passed in as answerURL, and constructs TestLine objects. TestLine objects are then held in the Vector answerList.


Constructor Summary
TestItem(java.net.URL questionURL, java.net.URL answerURL)
          Reads input txt file.
 
Method Summary
protected  TestLine getLine(int n)
          Returns a specific TestLine held in the answerList vector
protected  int getNumLines()
          Returns number of TestLines in current TestItem
protected  java.net.URL getQuestionURL()
          Returns questionURL for this TestItem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TestItem

public TestItem(java.net.URL questionURL,
                java.net.URL answerURL)
Reads input txt file. Constructs a TestLine object from information read from file. Places TestLine objects into a vector, then randomises the order of the vector
Method Detail

getLine

protected TestLine getLine(int n)
Returns a specific TestLine held in the answerList vector

getNumLines

protected int getNumLines()
Returns number of TestLines in current TestItem

getQuestionURL

protected java.net.URL getQuestionURL()
Returns questionURL for this TestItem.