Assignment 2
Assignment 2 is the coding of an applet which processes events.
There are three grades, pass, meritious and distinctive. The assignment
follows logically
Pass
Creation of the basic applet and its HTML file, the applet must
- Have a Textfield entry component which processes ActionEvents.
- In the actionPerformed() the string must be placed into a character array.
- The string must be displayed in the applet in
the color blue. However to count down on plagarism, the following proviso holds:
If the string typed in contains the last letter of your first
name then that particular letter should always be displayed in red,
and if the string contains the last letter of your surname then that letter
should always be displayed in green.
The Applet below illustrates this for the programmer Keith Yates. The program below minimally satisfies
the above and will receive 40 %. The use of loops, methods etc. The mark will be capped at 50%.
Pass Level
Meritious
For an applet to be viewed as meritious then further to all pass criterion,
- You must be able to position the drawing point of the string using the mouse
- If the string contains the last letter of either of your forename or surname than that letter
must be drawn to the screen in the colour specified in Pass level criterion
( by drawn I mean the graphics commands fillPolygon, drawRect etc. are used to
create the letter. Text objects, drawString and their derivatives are not allowed to place those particular
letters on the applet )
)
Distinctive
For an applet to be viewed as distinctive then further to all meritious criterion,
- It must be possible to 'drag and drop' any text using a mouse drag.
- Two buttons,"Bigger" and "Smaller" are implemented which process actionEvents and respectively
increase and decrease the size of the written text.