JavaDUCK -- A Project for a CS2 Course


In the Spring term of 1998, I taught Cornell's CS2 course, CS211. As a course project, the students were asked to create a tool much like the javadoc tool that comes as part of Sun's JDK. That is, the tool they were to create would:
  1. examine Java source code, and extract the basic structural information about each desired class (its member and static variables and methods, what packages the class imports, etc), and then
  2. create an HTML page for each class that summarizes this information.

We called the tool JavaDUCK (Java DocUmenter of Code, oK?).

We gave the students a scanner generated using the tool JLex from Princeton University. We gave them a simplfied grammar for Java (e.g, no arrays, no initializing expressions) plus a simple interface to conform to (so that we could write a common test suite), and we turned them loose!

We think that the results were very impressive (we received some nice email from the javadoc folks at Sun). The winners of Golden Duck can be found here. Keep in mind that these pages were generated from test suites that the students did NOT get to see beforehand.

The course page on the project (i.e., the one the students saw) can be found here, and the project handout can be found here.

JavaDUCK was originally conceived by me (Mike Godfrey) ... but two of my TAs did most of the work. Max Khavin generated the JLex scanner and wrote up the preliminary version of the handout. Dan Grossman did just about everything else, including the development of a set of test files (which we kept secret).

At present, Dan and I are working on a paper describing the JavaDUCK experience for SIGCSE '99. Max is off becoming rich on Wall Street.

If you are interested in using JavaDUCK for your course, please go ahead.
I would appreciate hearing about it, 'tho.


Back to my home page.
Mike Godfrey -- migod@cs.cornell.edu

Last modification: Wed May 20 11:19:53 EDT 1998