You can browse the documentation and source code for these classes in the doc subdirectory, or at http://www.cs.jhu.edu/~jason/226/toilet/doc To compile and test these classes: 1. Check that you have the Java compiler installed on your system: just type "javac" at the command prompt. It should be installed on the CS department machines. If the compiler is NOT found, you can download it. What you need is the JDK (Java Development Kit) or the Java Platform. The latest version is 1.4 (actually, 1.4.1) although you may be able to make do with earlier versions. (Note: In "Java 2," the "2" is not part of the version number; it's just marketing and you can ignore it.) Download the JDK from http://java.sun.com/j2se/1.4.1/ although Linux users will probably get better performance from the Blackdown project's implementation: http://snurl.com/nqo 2. Type javac AutoToilet.java to compile AutoToilet.java and all the other java files it depends on. This will produce a bunch of .class files. 3. To run, type java Toilet.java 4. To create HTML documentation, use the javadoc utility. I suggest that you put the documentation in a separate directory to avoid clutter. Make a subdirectory called doc, and type javadoc -d doc -private -linksource *.java The -d doc option says where to put the HTML documentation. The -private option ensures that private methods will be documented. The -linksource option lets you click a method name to see its source code. (Available starting with Java SDK 1.4.) Now you can view the documentation in your browser at the URL file:///your/directory/doc/index.html 5. OPTIONAL. If you want the source code to be hyperlinked too, try downloading one of these tools: http://www.xref-tech.com/java2html (hyperlinks everything) http://www.java2html.com/ (hyperlinks class names only) For example, to use xref-java2html once you've installed it: a. First run javadoc with the -linksource option as above. If you told javadoc to put the documentation in /home/jason/226/toilet/doc, then an HTML version of the sources will end up in the subdirectory /home/jason/226/toilet/doc/src-html b. Now start the xref-java2html GUI: java -jar /full/path/to/java2html.jar c. Browse to your source directory and "Add" it to the Sources box. For example, /home/jason/226/toilet d. In the target directory box, enter the src-html directory where javadoc placed the HTML version of the sources, as described in a. above. For example, /home/jason/226/toilet/doc/src-html e. If you relied on any nonstandard packages, you could add them to the Cut Paths box. For this example, you can leave that blank. f. Click "Run". This will modify the HTML version of the sources. 6. OPTIONAL. If you're teaching and want to make slides :-), try this: stripcmt AutoToilet.java | perl -0777 -pe 's/\s*?\n/\n/g; s/\n\n+/\n\n/g' | enscript -rB -f Courier16 stripcmt Toilet.java | perl -0777 -pe 's/\s*?\n/\n/g; s/\n\n+/\n\n/g' | enscript -rB -f Courier16 stripcmt Waste.java | perl -0777 -pe 's/\s*?\n/\n/g; s/\n\n+/\n\n/g' | enscript -rB -f Courier16 stripcmt LiquidWaste.java SolidWaste.java TrashWaste.java FloatingOverflowException.java | perl -0777 -pe 's/\s*?\n/\n/g; s/\n\n+/\n\n/g' | enscript -rB -f Courier16