Here is the travel agent code for Project 3.
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
Here is a very readable tutorial on how to make a style sheet.
Here is the style sheet used for this page.
Guidelines for the Project 1 documentation.
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:
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.
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.
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.
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.