MIDTERM
CS320, Fall 2007
Please upload your files to 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 CS3 server. Note that file uploading will be disabled
automatically after 8:40PM, and late submission will not
be
accepted.
[Problem Description]
In this exam you are going to implement
a web application that helps the CS students to select
the courses that they can take next quarter. In particular, the
application works as follows:
- Read a list of courses and
their prerequisites from a text file courses.txt
(compiled from CS
Undergraduate Required Courses Flow Chart with all the non-CS
courses removed).
Each line in the file shows a course and its prerequisites in the
format
"course prereq1 prereq2
...". Note that some courses like CS120 do not have
prerequisites.
- Read
the courses that will be offered in each quarter from
another text file offerings.txt
(compiled
from CS
Required Courses Scheduling Pattern). Each line in the file
shows the list of
courses that are offered in a quarter. There are four lines in the
file, representing fall, winter, spring, and summer quarter,
respectively.
- Display a list of all the courses,
and let a user to choose the courses
he or she has taken.
- Based on the
prerequisites
and the courses that will be offered,
display the courses the user can take in the next quarter.
Your application should consist of a JSP page CoursePlanner.jsp
and a Java bean CoursePlanner.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 CoursePlanner.jsp
is requested without any parameters, it displays the list
of the courses read from courses.txt
and let a user to choose
which
courses he or she has taken. For example:
After the user select the courses and click
the Next button, the JSP page displays the list of courses the user
can take in the next quarter. For example, suppose a user selects
CS122, CS201, CS202, and CS203, the JSP page should display the
following after the user clicks the Next button:
You may take the following courses next quarter:
- CS120
- CS245
- CS312
- CS332C
- CS332F
- CS337
And if there is no course that the user can take next quarter, the
JSP page should display "Sorry, there is no course that you can take
next quarter".
[Grading Criteria]
- Read data (20pt)
- Display the list of courses (15pt)
- Find and display the courses that can be taken (50pt)
- Everything works correctly
on the CS3 server (15pt). Both courses.txt
and offerings.txt are
available under the /tmp
folder on the
CS3 server.
- midterm.html
is missing
or
doesn't have the link to CoursePlanner.jsp
on the CS3 server. (-5pt)
- Please
do not modify
your files on the CS3 server after the due time or after you leave the
room. Doing so will be
considered cheating.