If you are using a PC at home, an analog of Fetch on a PC is called WinSock FTP. Here is a WinSock FTP tutorial.
Here's a quick summary of the most important buttons:
Run | -- | runs a program in BuggleWorld |
Reset | -- | puts BuggleWorld back to its initial state Reset must be hit before you can Run a program again. |
Step | -- | Each press of Step executes (roughly) one line of the program. Step can not be used if the program has been Run unless BuggleWorld is Reset. |
For the first assignment we will just change the code that we have been given.
/*
and */
around it. Do not comment out the
header of the method run()
. The file Hi.java
should look like this:
import java.awt.*; /* CS111 Lab 1 -- Task 1 -- Spring 2000 ben, and barb collaborate to say "Hi". ben draws a "H", barb draws a "i", */ public class Hi extends BuggleWorld { public void run () { /* // ben draws a "H" Buggle ben = new Buggle(); ... the rest of the code ... barb.dropBagel(); // barb dots her "I" barb.backward(4); */ } }Note that the closing squiggly brackets are outside of the comment, they must be black, not red.
Change setDimensions(9,9)
to setDimensions(13,13)
in the
init()
method in the beginning of the file, since letters "CS" take more room than "Hi"
(see the picture).
Compile and run the program. The grid should be 13 by 13. Pressing Run on the BuggleWorld applet should cause no action (i.e. nothing is written and no buggles are created).
The best way to write a program is to write a few lines of code, then test it by running the program, then add another few lines, test, and so on.
Try to make the picture exactly the same as shown above.
After you have saved your work, please make sure to delete your folder on the computer that you were using and empty the trash!