Studio 5
Getting Started
Locate and install the Studios/5 project into your eclipse workspace . Open report.txt in eclipse, fill in your team members' names, and keep the file open so that you can record your findings. Browse this studio document to get an idea of the work you will do in this session.Setup
* Think of a team name for your group. Try for something not easily guessed by other people. This team name will be used for posting timing results during the studio session.* You must do this studio on the same equipment that the other groups are using. Do not use your own equipment or any other machines for this, as timing is important.
* To run the studio, right- (control-) click on Main and drag down to Run As.. Java Application. The run should fail because your symbol table implementation is not complete.
* In the console window, click on the various line numbers reported in the exception trace for the CorrectnessChecks class, so you can get to the test that failed.
* Open the Main class in the default package.
* Edit the genSymtab method to switch to my implementation, as directed by the comments.
* Run the build again, so you can see the kind of output you will expect down the road.
* Switch back to your implementation in that file and continue on.
Design and Implementation Problem
You and your team are to design and implement a symbol table that meets the specification as described below. You are welcome to bounce ideas off other teams, and you should consider this problem in two phases:* Get an implementation to work. I have a test harness that will exercise your implementation and throw an exception if it does not work.
* Try for the most efficient solution you can. There is a contest afoot, and the winning team will receive gift certificates for Ben and Jerry's Ice Cream.
Specifics
* There are two files you might want to edit:-- In the studio package, you'll find the TeamSymtab class, where your implementation will be done.
-- In the Main class, there is a method that returns instances of a symbol table implementation. You can manipulate the comments to use my implementation just to see what is produced.
* Your work consists of completing the TeamSymtab class that you obtained when you installed the eclipse project. As mentioned above, it's in the studio package.
* The skeleton TeamSymtab has comments before each method describing how the method should work. If you are not sure about what the methods do, ask questions.
* You can use any Java library code you wish.
* Do not delegate to my methods (if it were to win, I'd get the ice cream).
* When you run this project, a series of correctness checks is first performed. Exceptions are thrown if any fails. The project then conducts a series of timing experiments.
Contest
When you are ready to submit your implementation to the contest, you must show the instructor:* the console, showing the execution times.
* your TeamSymtab class.
We'll write your team name and 100,000-sized times on the board. You can still work and try to beat any numbers that surface.
The winner will be determined by examining the 3 timings for the 100,000 run and the sum of those timings (computed for you).
The winner must beat all other contenders in each of the 3 timings tests for the 100,000 size run. It follows that this run's sum will also beat all other sums.
In case of a tie or incomparability, tieing teams can challege each other to a timing test of their own devising. See below for how to time your own tests.
To time your own code sequences, you can use the TimeRunnable class as per the following example:
timing.TimeRunnable t = new timing.TimeRunnable(
new Runnable() {
public void run() {
try {
Thread.sleep(5000);
} catch (Throwable t) { }
System.out.println("5 second snooze");
}
public String toString() { return "a timing test"; }
}
);
t.run();
System.out.println("Got " + t);