Scheduling Servlet Problem

Broken Schedule Code
Broken Schedule Tar File
Working Schedule Code
Working Schedule Tar File

Running Broken Schedule Servlet on Porsche
Running Working Schedule Servlet on Porsche

What was the symptom?

The problem that I noticed that led to this discovery occurred whenever I entered specific times into the servlet. This is best explained with an example: Suppose the free time constraints were MTWRF 8:00 AM-5:00 PM. Suppose I entered the busy time of M 7:00 AM-4:00 PM. The correct output would be M 4:00 PM-5:00 PM, TWRF 8:00 AM-5:00 PM. The output I was getting was MTWRF 4:00 PM-5:00 PM. So the problem occurred when I entered a busy time that started before the free time, but ended during it. Regardless of which day the busy time was for, all days with the same free time had the same output. This same problem occurred when I entered a busy time that started during the free time, but ended after it. Eventually, I came to realize that this was only a problem for all days that were grouped together for the free time interval. For example: Suppose the free times entered were MWF 8:00 AM-5:00 PM, TR 12:00 PM-3:00 PM. Suppose a busy time of M 7:00 AM-2:00 PM was entered. I was expecting this to affect MTWRF because it started before the free time for all those days, and ended during it. However, it only affected MWF as they all had the same free time. This just added to the confusion.

Solution


Anthony Michael Furst
Last modified: Fri May 5 21:22:31 EDT 2006

Valid XHTML 1.1