/** @author Scott Marshall @author University of Glasgow, MSc IT Project 2001 @author Building an OnLine Course in Computing Fundamentals Multiple Choice Questions */ import ukacgla_HTMLMulti.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.io.*; import java.util.*; import java.net.*; import javax.swing.JApplet; /** Main coordinating Class. */ public class Test extends JApplet { private TestUI test; private URL testURL; public void init(){ super.init(); int numQuestions = Integer.parseInt(getParameter("numQuestions")); //construct URL of the file containing the test questions try { testURL = new URL(getCodeBase(),getParameter("TestFile")); } catch (MalformedURLException e) { System.out.println("Invalid Test URL : " + testURL); } //generate a new test User Interface test = new TestUI(new TestEngine(testURL,numQuestions),this); } public void start() { super.start(); } public void stop() { super.stop(); } }