Students compete in teams of four. Programs are written in Java,
and submitted electronically to the judges who test the programs
and decide if a submission satisfies the correctness criteria.
Contestants are allowed to bring textbooks and notes, but no disks
or other computer media. If you are interested in additional details
about the format of the competition, you can view the
Programming in Java
Contestants for the programming contest
are required to submit their solutions in Java.
The programming contest is not designed
to test your knowledge of features of Java, so students only
need to learn Java sufficiently well to implement their
programs efficiently and correctly. Only the subset of
Java used by the Advanced Placement Computer Science exam
We have selected Eclipse (with Dr. Java plugin) as the Java
integrated development environment (IDE) for the contest.
This is the same Java development system used by
CMSC 131, the new
introductory Java programming course at the University of Maryland.
We will be using the Java 1.4.2 runtime environment. Teams may
also edit Java programs manually using standard text
editors and compile and run Java programs using the standard
compiler (javac) and interpreter (java). You can find
links to download the Java environment
Note that you need to download and install all three files: Java 1.4.2,
Eclipse 3.0, and Dr. Java 0.9.3.
Directions for Downloading and Using the Eclipse Development Environment
To download and install the Eclipse development environment:
Unzip the Dr Java files into the 'plugins' subdirectory (wherever you installed eclipse)
To run the Eclipse development environment:
On Windows, Eclipse will create a 'workspace' directory that will contain
all of your Java files. If you ran Eclipse directly from the directory it
is installed in, the workspace directory will be within the Eclipse directory.
If you ran it from a desktop shortcut, the 'workspace' directory will be in the
directory you configured the shortcut to start in.
Double click on the 'eclipse.exe' application within the
eclipse directory (wherever you installed it)
If Eclipse was installed
correctly, you will be rewarded with a purplish splash screen as Eclipse starts,
and then a large window showing Eclipse.
First, we want to open the Dr
Java plug-in. Do this by selecting Window > Open Perspective > Other.
Select "Dr Java" from the resulting dialog window.
On the left edge of
Eclipse, you'll see an icon with a big white J on a black background.
Click on it, and you'll enter Dr Java mode (Eclipse calls different view modes
To create a project in Eclipse:
Select File > New > Project ...
Select "Java" from the list of project types, and click Next
Enter "JavaEyes" as the project name and click Finish.
You'll get a dialog asking if you want to switch to the Java
perspective. Check the "Do not show this message again" box and click
Download JavaEyes.java and save it into
the JavaEyes directory of your Eclipse workspace.
In Eclipse, select File > Refresh
Open the JavaEyes project by clicking on the little plus sign
Open the "(default package)"
Edit JavaEyes.java by double-clicking on it.
To compile and run a project in Eclipse:
With Eclipse, you do not have to manually compile your project.
Instead, Eclipse automatically compiles your code every time you save your
files. However, you can force it to recompile your project with the
Project > Rebuild Project menu.
You can run the program with the Run > Run As > Java
Application menu. You should see the JavaEyes program running in a new
window. Move your
mouse around in the window and watch the eyes follow it.
done playing with JavaEyes, close the window with the regular window buttons to close the
application. You can run the program again with the Run > Run Last Launched
menu. Or, more simply, click the little person running icon.