MIDTERM
CS320, Spring 2006


Please upload your files using CSNS. The files should include all the source code, documentation, and an HTML file midterm.html which contains a link to your JSP page on the CS server. Note that file uploading will be disabled automatically after 7:50PM, and late turnin will not be accepted.

[Problem Description]

The faculty in the Computer Science Department like to meet once a week for lunch. However, due to different teaching schedules, it usually takes several rounds of email to determines the time slot when everybody is available. To make scheduling a lunch meeting easier (thus the faculty happier and give out better grades), you are going to develop a web application called Lunch Meeting Planner (or LMPlanner for short), which helps the faculty plan their weekly lunch meeting.

Your application should consist of a JSP page LMPlanner.jsp and a Java bean LMPlanner.java. You may use more JSP pages or Java classes if necessary, but note that no scripting elements or JavaScript is allowed in the JSP page(s).

[Implementation]

When LMPlanner.jsp is requested without any parameters, it displays the possible time slots for the lunch meeting, and for each time slot, the names of the faculty who are available for lunch at that time. For example:


11:00 - 11:30 11:30 - 12:00 12:00 - 12:30 12:30 - 13:00
Monday Kang
Crespi
H. Guo
Kang
Crespi
H. Guo
Kang
Kang
Tuesday Sun
Sun


Wednesday
Kang
J. Guo
Crespi
Kang
J. Guo
Crespi
Thursday
Crespi
Sun
Crespi
Sun

A faculty (or any person for that matter, but security is not our concern) may select a time slot using the drop-down lists, type their name in the text box, then click the Add (or Remove) button to add (or remove) their name to the selected time slot. Note that an Add request should be ignored if the name to be added is already in the time slot, i.e. a name should appear in a time slot only once. For simplicity, you may assume that the names are case sensitive and no two faculty have the same name.

When a time slot has at least four names in it, the time slot is highlighted, i.e. the background color of the table cell is set to yellow, as shown below:


11:00 - 11:30 11:30 - 12:00 12:00 - 12:30 12:30 - 13:00
Monday Kang
Crespi
H. Guo
Sun
Kang
Crespi
H. Guo
Sun
Kang
Kang
Tuesday Sun Sun


Wednesday
Kang
J. Guo
Crespi
Sun
Kang
J. Guo
Crespi
Sun
Thursday
Crespi
Sun
Crespi
Sun

When the number of names in a highlighted time slot drops below four, e.g. a faculty may remove his or her name from the time slot, the time slot should be "de-highlighted", or in other words, the background color set back to the default background color.

[Grading Criteria]