Today's agenda:
Go to the download directory using cs111d on puma, and download the lab3_programs folder to your desktop.
EXERCISE 1 -- Welcome to ChecksWorld!!!
What picture does ChecksSimple.java produce? Task 1
Open the file ChecksMethod.java and the file CheckerBuggle.java.
You need to write a method of CheckerBuggle (in the file CheckerBuggle.java)
which draws the same picture as the program
in ChecksSimple.java does. Note that the class CheckerBuggle is an extension of the
class Buggle, so you can use all methods of the class Buggle.
Please follow these steps:
Task 2 Modify the files Checksboard.java and CheckerBuggle.java
to solve the problem.
Move the file
Checksboard.html to the top of Link Order to run the code.
Then add more methods to the class CheckerBuggle in CheckerBuggle.java and invoke some of these methods
in Checksboard.java on the CheckerBuggle that you have created.
All the drawing and most of the moving must be done
in methods of the class CheckerBuggle, not in run(). In this exercise and in the rest of the lab the method
run() must be very short: just creating a new buggle and a few (between one and five) method
invocations. If you write the program this way, it will be easier to reuse the methods from one exercise
in another.
In the end of the program the buggle must be positioned as shown below. However, it may have any color
(not white, as on the picture).
Task 3
You may not use setPosition() in any exercises of this lab.
Modify BigChecksboard.java to solve the problem:
Task 4