HW1a: Using the Repetition and Conditional Statements with Java Graphics Primitives
Due: Tuesday, February 3, 2004, Noon
[10 points]
The applet program should use the Java graphics
primitives, the conditional and the repetition statements to draw
the pattern
as per the specifications given below:
-
Using the JOptionPane.showInputDialog, prompt the user for the number of rows
as well as the number of columns.
- Draw the pattern as shown in the applet with alternating
black and red squares across columns as well as rows.
-
The applet should write your name at the top.
Click here to see the applet in action
HW1b: Using the File I/O
Due: Tuesday, February 3, 2004, Noon
[10 points]
Write a Java application which reads a text file one line at a time. The
input file contains numeric data (integers or doubles), one number per
line. The program should prompt the user for the input file (use
JFileChooser.showOpenDialog), read all the data from the file, and display
the average as a message dialog to the user.
Homework Submission
Please zip all your files into a single zip file and upload this file using the
Student Tools -> Student Dropbox under CourseInfo site for this class.