CS111 Lab 3 -- Spring 2002

Today's agenda:

 


Go to the download directory on cs111 server, and download the lab3_programs folder to your desktop.

JEM exercise

Draw JEM for the following example:

EXERCISE 1 -- Welcome to ChecksWorld!!!

What picture does ChecksSimple.java produce?

Run the project to see the answer.
Note: since the class CheckerBuggle is defined in several files in this project, you may see error messages when you first compile and link the project. You need to recompile the project twice to get rid of the error messages.

Click here for the answer

 

Task 1 -- Drawing a pattern using Methods

Write a program that drwas the same picture as ChecksSimple.java , but using a method. Write your code in ChecksMethod.java.

Do not change ChecksSimple.java.

To run the new code, place the file ChecksMethod.html first in Link Order in the project window.

 

Task 2 -- Drawing a checkerboard using Methods

Modify the Checksboard.java file in the lab3_programs folder to solve the problem. Move the file Checksboard.html to the top of Link Order to run the code.


Task 3 -- Drawing a more complex checkerboard (using more Methods...). Write your code in the file BigChecksboard.java. Don't forget to move the file BigChecksboard.html to the top of Link Order.

 

Modify BigChecksboard.java to solve the problem: