August 2000 QUESTION 2 Total Marks: 15 Marks |
Click here to access other
questions
Click to access |
(a) Explain what is meant by a Java applet,
and how it differs from a Java (b) Declare a class Scribble, such that it can be run as an applet. Your class should include the protected int members X1 and Y1. [3 marks] (c) A Graphics object is the simplest
way to do drawing in Java. It contains the method drawString, which
takes three parameters, a string, an x co-ordinate and a y coordinate. (d) Write the HTML needed for your Scribble applet to be displayed in a viewer, with dimensions 100 x 100. [3 marks] (e) Give the import statements necessary to complete your applet. [2 marks] |