FINAL
CS320, Spring 2005


Please upload your files using the online turnin server. The files should include all the source code, documentation, and an HTML file final.html which contains a link to your application on the CS server. Note that file uploading will be disabled automatically after 10:05PM, and late turnin will not be accepted.


[Introduction]

A local ACM Student Chapter has accumulated a sizable collection of technical books over the last few years. Most of the books are about topics such as software development, networking, and program languages, which would interest many students and faculty. However, due to the lack of a proper distribution mechanism, the books are just collecting dust now on the shelves in the ACM office. To rectify this situation, the ACM chapter has chosen a member to be the librarian to manage these books. To make the life of the librarian a little easier, you are going to develop an online book reservation system, using, of course, JSP without scripting elements. With this system, students and faculty can browse and reserve the books that they are interested in online, and later pick up the physical copies of the books at the ACM office. The system also helps the librarian to keep track of the books in the collection.

In its simplest form, the online book reservation system consists of a Login page, a User page, a Librarian page, and a backend database.

[Database]

The backend database contains the following information:
For this part of the exam, you need to turn in a library.sql file which include the statements to create all the tables in the database, and the statements to populate the tables so that there are at least four books in the database, and each table has at least two records.

[Login]

A user must login to reserve books online. The Login page validates the username and password provided by a user against the information stored in the database. If the authentication is successful, the Login page redirects the user to the User page or the Librarian page based on whether the user is a librarian or not.

[User]

The User page allows a user to browse, search, and reserve books, as shown below:

Title Description Status
Code Complete Best practices in the art and science of constructing software. Topics include design, applying good techniques to construction, eliminating errors, planning, managing construction activities, and relating personal character to superior software Available
Programming C# Programming C# provides an adept and extremely well conceived guide to the C# language and is written for the developer with some previous C++, Java, and/or Visual Basic experience. CheckedOut
Java - How to Program Enormous, expensive, heavy (I carried it around northern europe for a month so I know this!) and overwrought. Too much bloat and prattle at times. Excellent presentation. May overwhelm a beginner. Reserved
Core Servlets and JavaServer Pages Intended for developers familiar with Java, this guide explains the role of servlets and JavaServer Pages (JSP) in creating e-commerce sites, dynamic web sites, and web-enabled services. Topics include handling missing data, manipulating HTTP status codes, redirecting requests, setting JavaBean properties, and accessing databases with JDBC. The second edition has been updated to servlets 2.4 and JSP 2.0 Available

By default the page displays all the books in the database. A user may use the keyword search feature to limit the display to only the books whose title or description contains the keyword.

A user can reserve the books which are currently available. However, the total number of books which are reserved or checked out by the same user cannot be more than 2. For example, a user may reserve at most two books, and if he or she has already reserved or checked out one book, then the user can reserve only one more book. If the reservation fails due to the violation of this rule, an error message should be displayed, and if the reservation succeeds, the status of the reserved books should be changed from Available to Reserved.

[Librarian]

The Librarian page allows a librarian to view and update the status of the books through drop-down lists, as shown below:

Title Status User
Code Complete Available
Programming C# cysun
Java - How to Program somebody
Core Servlets and JavaServer Pages Available

Note that the Librarian page is designed to allow only three kinds of status updates:
And similar to the User page, the Librarian page also has a keyword search feature, which can be used to limit the display to only the books whose title or description contains the keyword.
[Grading Criteria]