Bugs: Documentation Problem Set

Luis F. G. Sarmenta (lfgs@ai.mit.edu)
Wed, 15 Oct 1997 20:58:59 EDT

Hello everyone,

I have good news and bad news about the Documentation
Problem Set.

First, the bad news ... there are bugs in the code.
(There was some missing code and some typos that caused
it not to function properly, even though it compiled properly.)
So, please check the Web page again for the new code.

http://www-cs101.ai.mit.edu/courses/fall97/psets/Documentation/

Here is a list of affected files:
CalculatorState.java
ButtonHandler.java
OpButtonObj.java
(new file) ClearButtonObj.java

If you've viewed the web page before, be sure to
hit "Reload" just to be sure you have the latest copy.

Sorry about this :(

Now the good news ... you can now compile/run/modify
the code to help you test and understand it. Below
are the instructions for doing it in lab or on Athena.

The instructions are also available at
http://www-cs101.ai.mit.edu/courses/fall97/psets/Documentation/Readme.txt

Cheers,

Luis

======

Instructions for compiling and running the Documentation problem set
--------------------------------------------------------------------

In Lab:
-------

1) Start Java Workshop
2) Show Project Manager and select Add->Project
3) Use Browse to select S:\Documentation\Documentation.prj
4) Make sure to select "Make a copy ...", then press Next.
5) When asked for the directory, say U:\Documentation

After this is done, Java Workshop will copy the pertinent
.java files from S:\Documentation to U:\Documentation.
You should be able to see the Documentation project in the Project Manager.

You can now build your program and run it (build it first before running it).
(Note: when you build, JWS will create a subdirectory
U:\Documentation\Calculator, where the .class files will be placed).

If you want to test things, you can edit the appropriate files, build
(or compile them), and then run them to see what happens. If you
want to use System.out.println, you can open Windows->Java Console (under JWS)
to see the output.

on Athena:
---------

1) Setup Java as you did for previous labs, including paths and CLASSPATHs

2) cd to _your own_ 6.096 subdirectory

3) mkdir Documentation
cd Documentation

4) (you should now be in (your homedir)/6.096/Documentation)

cp /mit/6.096/share/java/Documentation/*.java .
(the last "." above is necessary)

At this point, you will have the .java files in your directory.
You can then edit the files using emacs.
To build and run, do the following:

5) (from your 6.096/Documentation subdir)

javac -d . *.java

This will create a Calculator subdir, which will contain the .class files.

6) To run it, type (from
your 6.096/Documentation (_not_ Calculator) subdir):

java Calculator.Main