CIT 594 Programming Languages & Techniques II
Previous Announcements

April 16, 2002 Would you like a good-sized text file to try out your Huffman encoder? I've been using Huckleberry Finn (~580K) from Project Gutenberg.
April 15, 2002

Due to an error in, I was failing to compress the bit vector before writing it. I have posted a corrected version; the output file should be between 0 and 4K smaller. You do not need to download the corrected version if you don't want to; the original version works, it just wastes up to 4K bytes.

For this correction, you must remember to use vec.writeBitVector(outputFile) and vec=readBitVector(inputFile) rather than outputFile.writeObject(vec) and vec=(BitVector)inputFile.readObject(). However, with the uncorrected version, it doesn't really make any difference which pair of operations you use.

April 12, 2002 The sixth quiz will cover material from April 2 through April 11. You will not be expected to know the details of any particular graph, spanning tree, or alpha-beta algorithms, but you may be asked to informally find the results of these algorithms (for example, I may ask you to find a minimum-cost spanning tree of a graph, but I don't care how you find it). You are expected to know the details of DFS, BFS, and Iterative Deepening DFS.
April 12, 2002 Slides for this week's lectures have now been posted. Sorry it took so long.
April 9, 2002 A command named "forte" is now available on all of the 207 machines. It does a sanity check on the user's quota and, if they have enough space available, it starts Forté.
April 8, 2002 Here are some Notes on Huffman Encoding that address (1) newline problems, (2) computing sizes, and (3) measuring execution time.
April 8, 2002 I have added to Assignment 9 (same link as before) some brief information about the I/O routines writeBitVector and readBitVector. As far as I know, all methods are now working properly, including the I/O routines.
April 8, 2002 I have added slides for last Thursday's class, including those parts of the lecture that I didn't have slides for at the time.
April 4, 2002 My file input/output still does not work, and I'm going away this weekend so I can't debug it. Everything else works, so far as I know, so here is a preliminary version of and
April 4, 2002

I seem to have posted two different due dates (April 4 and April 11) for the extra credit assignment 8X. So--

  • The extra credit program will be due April 11.
  • No late extra credit programs will be accepted. Period.
April 3, 2002 The second version of Assignment 9 has been posted (same link). I still haven't posted the bit vector code, though. Soon!
April 2, 2002 I've posted a first draft of the next assignment (Assignment 9, Huffman encoding). I will post a new, improved version tomorrow.
April 1, 2002

Comments and clarifications on the extra credit assignment (Binary Tree Editor):

  • This is not a required assignment, and you do not need to do it in order to get (or maintain) an A in the course. Doing the assignment may raise your grade; not doing it will not lower your grade.
  • I expect the program to be quite difficult, and I do not expect many people to do it.
  • The best way to do this program (and the way I would prefer) is to add classes to your program for Assignment 8 and turn in the whole thing--that lets me test your editor with your binary trees. However, it is a separate assignment, and should be turned in separately to Blackboard.
  • The due date is Thursday, April 11. Late penalty will be 10 points per day (instead of the usual 5).
  • Remember, you cannot earn more points on this than you earn on Assignment 8.
  • The program must have a good, easily understood GUI; this will be a strong component in the grading.
March 29, 2002 I've now posted the Heapsort PowerPoint slides, with corrections to the heapify method, and the Comparable and Comparator slides, with the improvements suggested by Randy Sidlinger.
March 28, 2002 Apparently I forgot to put this in the announcements, but the problem of using Forté to generate javadoc for private methods was solved and posted in the Forté FAQ a week ago.
March 28, 2002 I have posted preliminary letter grades on Blackboard, and provided an explanation of what they mean.
March 27, 2002

If you run my version of the Animals! game from Forté and get a NullPointerException, it's because my program is trying to use your old animals.dat file (in Forté's forte4j/bin directory), not the animals.dat file I supplied. Remove or replace your old file, and everything should be OK.

This is partly my fault for not printing out an informative message when I get a ClassNotFoundException. I've just posted a new version of my game which prints a message in this case; this is the only change, however, so if you are reading this message, you don't need the new version.

March 25, 2002 It has been pointed out to me that in my public BinaryTree(Object value, BinaryTree left, BinaryTree right) constructor, I have forgotten to detach left and right from their possible parents. Oops.
March 25, 2002 I've decided that there will be no quiz tomorrow (March 26), partly because we haven't covered that much, but mostly because that makes the remaining two quizzes easier to schedule.
March 25, 2002 Here are a few Notes on the Animals Assignment.
March 25, 2002 I have posted my version of the Animals! game (Assignment 7), as a Forté jar file. You are welcome to use as much or as little of this code as you like in your Assignment 8.
March 21, 2002
  • The next assignment has been posted
  • I will post my version of the Animals! game Monday (not tomorrow, as I said in class)
  • A professional thief is operating in the building--be extra careful
  • I will teach a new course, CIT597, in the Fall: Advanced Java and Java-related technologies
March 8, 2002 If you are still having trouble with I/O for the Animals! assignment, I've put up an Additional Help page.
March 6, 2002

Assignment 7 is due by midnight, Thursday, March 7. Late points will be assigned as follows:

March 8 5 points               March 21 25 points
March 9-18   10 points   March 22   30 points
March 19 15 points   March 23 35 points
March 20 20 points   Later Not accepted
March 6, 2002 Assignment 5, Expression evaluation, has been re-graded, and many scores have been revised upwards. You may wish to check on Blackboard to see if yours was among the upgraded scores.
February 26, 2002 The seventh assignment, Animals!, is ready.
February 26, 2002 It has been pointed out to me that in Assignment 6 (CrazyMaze), I said that you were not to change the GUI, and this is in conflict with a requirement to put your name in the GUI. Ouch! I guess you don't have to display your name.
February 26, 2002 Added a short writeup on packages.
February 26, 2002 Omissions in my code. If you are using a HashSet, then Position needs a hashCode method. If you are using a TreeSet, then Position needs to implement Comparable. Sorry, I didn't think of these possibilities. Here is the new, improved code.
February 25, 2002 I will be out of town (at a conference) from Wednesday through Friday of this week. Hence I will have no office hours on Wednesday or Thursday and there will be no class Thursday. However, the Friday lab in Moore 207 will be held; Joanna should be there to help you and answer your questions.
February 24, 2002 Discovered that I accidentally omitted an important routine, void undo(), from the writeup for assignment six. It has now been added.
In addition, you should note that I defined equals for the Position class.
February 24, 2002 The improved version of maze.jar (for the sixth assignment) is ready. The most significant change is that I have solved the flicker problem.
February 22, 2002 The sixth assignment (Maze Running) is ready.
February 21, 2002 WARNING. It appears that if you exceed your disk quota, Linux throws your files away. I am getting email from students who have lost all their work, not just once, but over and over. I am trying to get something done about this; but for now, either use the Windows machines, or discard any files you don't need, and check your quota with quota -v before continuing.
February 20, 2002 My TAs have adjusted their office hours so that they can assist me in the MF labs. See the new hours above. Please come visit us in the new labs; we don't want to be lonely!
February 20, 2002 Finally got around to adding my grading policy to the What this course is about page (it's practically the same as last semester.)
February 15, 2002 Henceforth, my Monday and Friday office hours, 2pm-3pm, will be held in our new lab, Towne Moore 207.
February 15, 2002 Rearranged the links at the bottom of this page.
February 15, 2002 I just put an updated version of my Stacks PowerPoint presentation on the web. It contains no new information; the only change is that I've added a fancy animation for the recursive factorial method.
February 13, 2002 The links to my Backtracking writeup mysteriously disappeared from this page--I have no idea why. Anyway, they are back now.
February 12, 2002 Here's the Expression Evaluation assignment.
February 12, 2002 Fixed broken links on the Previous Announcements page, including the one to the page on .jar files. Also put a more permanent ink to that page at the bottom of this page.
February 7, 2002 The third Forté tutorial (Using the Debugger) is now ready. Links to previous tutorials (and to the FAQ) have been moved to the bottom of this page.
February 7, 2002 For various reasons, I have decided to extend the due date for the Backtracking assignment to next Tuesday, February 12. I will post some additional hints on how to do this assignment.
February 5, 2002 If you are having trouble getting your program to show the rings turning, put this code in your JFrame class to force the new information to be displayed: update(getGraphics());
February 5, 2002 I will not have the review session scheduled for Wednesday, February 6.
February 1, 2002 Please note that I'm expecting you to use Forté with Swing (rather than the AWT) for the Backtracking assignment!
February 1, 2002 I've just posted my second Forté tutorial. It has some interesting stuff in it! You are not actually required to step through the tutorial, but I think it would be a good idea.
January 31, 2002 Important note: You remember how Java cares about the name of the Java file? It turns out that Forté cares about the name of the folder that the files are in. If you have not yet turned in your assignment, please jar the entire folder and turn it in. (If you have already turned in the assignment with all the required files, don't worry about it, and we'll figure it out. I think.)
January 31, 2002 The next assignment (backtracking) is ready. I will shortly post a second tutorial on creating an application with Forté, which you are welcome to either use or ignore.
January 31, 2002 Quiz next Tuesday (February 5). It will cover everything the previous quiz didn't.
January 31, 2002 Today's FAQ: What do we do about negative numbers?
Answer: They are a result of integer overflow, that is, the number is too large to fit in a long (you are using longs, aren't you?). The best thing to do is to report "number too large" as your result. But, since I didn't say in the assignment that you should do this, you are also free to ignore them.
January 30, 2002 Added a page on .jar files.
January 29, 2002

If you have trouble timing a couple of the Fibonacci methods (because they run too fast), consider this trick:

     <start timing>
     for (int i = 0; i < 1000; i++)
          <call the factorial method>
     <stop timing>
     double microseconds = (<stop time> - <start time>) / 1000.0;
January 29, 2002 Here's how to convert a String to a long:
          long myLongNumber = Long.valueOf(myString).longValue();
January 28, 2002 I have written an Addendum to the Forté Tutorial. This explains how to set up a folder on the E: drive that you can use for your project.
January 28, 2002 In the Fibonacci assignment, I forgot to say to use AWT rather than Swing. (AWT is preferred for applets, since some browsers don't understand Swing.) But, since I forgot to say, it's OK to use either. If you haven't yet started, though, please use AWT.
January 25, 2002 I will not have office hours on Monday, February 4.
January 24, 2002 The Third Assignment (Fibonacci) is ready.
January 24, 2002 I've posted today's quiz, with answers. (Correction: Answer to 1.15 is B, not A.)
January 24, 2002 Today's most popular question: Does it matter if there's an extra NIL (or T) at the end of the output? Answer: No, I don't care about that.
January 24, 2002 Added brief descriptions of two special forms, eval and apply, to the second Lisp assignment. These functions, although not strictly necessary, can be very helpful in doing this assignment.
January 22, 2002 Added some (hopefully) helpful suggestings to the second Lisp assignment. It's due at midnight on Thursday, as one .lsp file turned in via Blackboard.
January 18, 2002 If you can't find XLisp on the lab machines, it's in Start -> Programming Languages.
January 18, 2002 I won't be available on Monday, January 21 (it's a University holiday).
January 17, 2002 The Macintosh version of XLisp can be found at
January 17, 2002 Second Lisp assignment
January 17, 2002 Newsgroup created: news://
Blackboard created: (Don't use for first assignment.)
January 15, 2002 Review sessions will be in Towne 321, Wednesdays 2:00-3:00. These sessions are optional; I will not cover any material that I don't also cover in the regular class sessions.
January 14, 2002 XLisp is now available on the PCs in the labs.
January 14, 2002 I've added a page on Using XLisp and Liquid Common Lisp. There's still a question about transcripts that I'm working on.
January 11, 2002 Time and room change. Now meeting TR 4:30-6:00 in Moore 23.
January 11, 2002 XLisp can be downloaded from The file you need is the last one on this page,
January 11, 2002 Owing to a glitch in the HTML file, the Lisp pretest was accessible from Internet Explorer, but not from Netscape. This has now been fixed.
January 10, 2002 This way to the first Lisp assignment!
December 21, 2001 CGS students who were enrolled in CIT 591 last semester will be permitted to register for CIT 594 in Spring 2002 (as soon as a bit of paperwork goes through).