0% found this document useful (0 votes)
50 views1 page

Java 4

This document outlines homework assignments for a programming class. It provides 6 programming tasks split into two parts. Part A includes tasks to save alternate words from user input to a file, print the first letter of each line from a text file, and demonstrate the lifecycle of an applet. Part B includes tasks to create an applet for a cyclic countdown, display text on mouse click, and design a window to input and save user details to a file.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
Download as doc, pdf, or txt
0% found this document useful (0 votes)
50 views1 page

Java 4

This document outlines homework assignments for a programming class. It provides 6 programming tasks split into two parts. Part A includes tasks to save alternate words from user input to a file, print the first letter of each line from a text file, and demonstrate the lifecycle of an applet. Part B includes tasks to create an applet for a cyclic countdown, display text on mouse click, and design a window to input and save user details to a file.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1/ 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.

You might also like