Sie sind auf Seite 1von 1

CAP310: Modern Programming Tools & Techniques I

HOMEWORK #4

DOA:__-__-____ DOS:__-__-____ DOT:__-__-____

PART A

1 Create a program that prompts the user to enter a line of text and saves each
alternate word into the file “AltInputs.txt”

2 Write a program to read a text file “MyFile.txt” and print the first letter of each line
of text in it.

3 Write a program to demonstrate the life cycle of an applet. Each life-cycle method
must output its name on the screen console when invoked.

PART B

4 Write an applet that displays a cyclic countdown of numbers from 10 to 1 at intervals


of 0.5 seconds.

5 Create an applet to display “Hello” wherever the mouse button is clicked on the
applet canvas.

6 Design a closable window using Swing/AWT components to input details of a user such
as Name (using Text Field), Age (using Password Field), Gender (using Radio Buttons),
and Remarks (using Text Area) and a Save Button which when clicked saves user
entered information into a disk file.

Das könnte Ihnen auch gefallen