The CS211 Course Project: JavaDuck
Now Available: How we tested your programs!
We ran your programs on 16 tests, included below. Here is how to
basically re-create what we did:
- Download the eighteen files below.
- Add
TestAll.java
to your CodeWarrior
project and make it your Main Class
- Put the sixteen files
One.java, Two.java, ..., Sixteen.java
in the appropriate directory (the one with your AppClasses.jar or
.class files). Put testResults.html
there too.
- Run the program.
- Open
testResults.html
and use it to look at the 16 html
files your program (hopefully) created. Also look at
testSuiteOutput.txt
(the top link on the page) -- this
records whether or not your program threw an exception on each of the
test files.
Note: The above won't work if you didn't follow the input/output
specifications. This includes hard-wiring an absolute path into your
program, not reading in the correct file (correct is to add ".java" to
what you're given) and not creating the correct file (correct is to
add ".html" to what you're given). If you violated the
specifications, you lost some points and we modified your program so
the tests could be run. You may have to make similar modifications.
You may also just run the test files using the DuckWidget, of course.
You should not need to "Quit" in-between each test. If you do, then
either you are violating the specifications or you have static
variables that should not be static. In the latter case, we again
penalized you appropriately and made appropriate modifications.
Here's the old stuff you downloaded long ago...
- Here is the project handout:
and related notes:
- Here are the slides done by Dan in lecture Thurs April 9th:
- Here is the code for handing out:
Last updated 23 April 1998
The updates make handling comments nicer. If you had no comments in
your test code, you won't notice a difference. For more information,
look here.
- Yylex.java
(Implements the lexer; do not look at this file.)
- TokenType.java
(Defines constants for determining types of tokens returned
from lexer.)
- DuckWidget.java
(Simple GUI that takes a class name, makes a Documenter object,
and calls that object's documentClass method.)
- CloseableFrame.java
(DuckWidget extends CloseableFrame.)
- For those of you who want to create fancy HTML, here are
some guidelines.
Or get all the code in one compressed bundle (should be faster since
Yylex.java is large, but the compressed version is small):
Here's an example input and output file. The output was actually generated
by a sample solution. Of course, your
output won't look exactly the same, but it will convey the same
information.
- Pizza.java
- Pizza.html
To see the what the raw html looks like, click
View -> Page Source
on your Web browser.
Last modification: Wed May 20 10:44:58 EDT 1998