[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:
|
|||||||||||||||||||||||||
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:
|
|||||||||||||||||||||||||
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]