BIRLA
INSTITUTE OF TECHNOLOGY & SCIENCE, PILANI
SOFTWARE
DEVELOPMENT & EDUCATIONAL TECHNOLOGY UNIT
SDET C102, CORE JAVA
LAB-8 : 23/11/07
Write a simple Quiz application. Create a login interface and on providing correct details user should be allowed to take quiz. Create a class called Question which has fields like quesiontext, option[4] and correct option. Use label to display question and checkboxes /(radiobutton) to display options. Once user answers a question and says submit, next question should be shown and so on. At the end of the test user should be shown his score. You can use card layout in this case. One card for login interface, another card for taking test and final card for showing result to the user.
Write a program which
takes a string as command line argument and displays that string as
a marquee (moving text) on a frame. Let's say, the text should
continuously move from right to left. Use the animation hints
provided before in class. In paint() use Write an interactive fun game applet which take a String and
display it's morse code translation to the user.
Assume only characters A-Z and Space are entered. Trim
leading/trailing whitespaces and coalesce adjacent whitespaces.
Capitalize all alphabets; These are the codes:
Hint: use an array of Strings to map each character to it's morse
representation.Graphics
class's
drawString(String str, int x, int y)
method.
A .- H .... O --- V ...-
B -... I .. P .--. W .--
C -.-. J .--- Q --.- X -..-
D -.. K -.- R .-. Y -.--
E . L .-.. S ... Z --..
F ..-. M -- T - Space /
G --. N -. U ..-