Project 3 is now available. It is due December 9.

Here is the travel agent code for Project 3.


Homework #3. Intro to Prolog. This is due November 20.

likes.pro You'll need this for task 2.


Project 2 is now available. It is due November 8.

Here is the Graham code for Project 2.

Task 4 in project 2 asks you (among other things) to generate style sheets. The W3C's web page about style sheets (with lots of documentation) is here.

Here is a very readable tutorial on how to make a style sheet.

Here is the style sheet used for this page.



Answers to Homework 2 are now online.

Pictures showing the answers to task 1 are here and here.


In preparation for Project #2, which will make its appearance on Monday, you should read pp 405-415 in the Touretsky book. You also should take a look at Chapter 7 of Paul Graham's book On Lisp, which is available online. Both chapters talk about macros - Touretzky is easier reading, but Graham goes into mroe depth.
Homework #2. Intro to Common Lisp. This is due October 16.


Guidelines for the Project 1 documentation.

Project #1 - Extending the PWS

SimpleAction. An example action that takes a request and sends back the date and time, the user's hostname and IP address, and the CGI arguments.

Helpful links for Project #1:


Homework #1.

The Clock class for homework #1.


Sample Answers for homework #1. Note: your code might be implemented differently than this; that's fine. What's important for this assignment is that the functionality is correct.

Queue.st MyLink.st - a helper class for the Queue.
Some things to notice here:

PriorityQueue.st

Notice that the only thing I need to override in PriorityQueue is enqueue. Even in that method, I try to keep it as simple as possible by letting the superclass (Queue) do a lot of the work, such as when the queue is empty, or when the new element goes at the end. This makes the logic easier to follow, and makes the code easier to debug.

Clock.st

Notice that inside start, I check to see if the clock has been set and, if not, set it to a default value. This way, the uer doesn't get an unexpected crash if they start it without setting it.

AlarmClock.st

Similarly, here I set alarmBlock to a default value. This means that the user doesn't need to know about the internals of alarmClock. If they want to change alarmBlock they can, but it'll work even if they don't.

MyClockMorph.st

This is a pretty minimal clock interface. Notice that there's a method in MyClockMorph that allows the user to set the time. This separates the Model (The AlarmClock class) from the View (the Morph). This means that the user doesn't need to know about the implementation.

In other ways, this design is not so good. (Many of you did much nicer ones!) For example, I'm storing alarmState in the Morph, whereas it should probably be in AlarmClock. Also, the GUI is not very pretty.