CSCE 590: Problem Set 1

Due: Tuesday, 10 February 2004, @noon

Upload Problem Set

Library of Babel

"The universe (which others call the Library) is composed of an indefinite and perhaps infinite number of hexagonal galleries, with vast air shafts between, surrounded by very low railings. From any of the hexagons one can see, interminably, the upper and lower floors. The distribution of the galleries is invariable. Twenty shelves, five long shelves per side, cover all the sides except two;" — Borges.

The USC CSE Virtual Library

Our University has a highly regarded library with countless volumes on many topics, except, it seems, Computer Science. However, if you visit the office of any CSE faculty member you notice at least two bookcases full of books the best reference books in the field. These books could form the basis of a CSE virtual library, if only there was a tool for bringing them together. Your task for this problem set is to write this program.

The system will have registered users who can add books and request to borrow books, as well as non-registered users (anyone else) who can only browse the library titles. A registered user should be able to create an account and add his books to the system. He should also be able to see all his books to determine which ones are being lent out, to whom, and when are they expected back. He should be able to mark a book as lent out. A non-registered users should be able to view and search over all the books as if they were one. Once the desired book is found, only a registered user should be able to determine the owner of that book and his email address.

You will need to run the servlet on the tomcat engine you installed on one of the lab machines. Follow these instructions for installing tomcat (local copy).

Requirements

The list of specific requirements is the following:

  1. The front page must have a search box, a list of most recent book additions, and a list of most popular (most borrowed) books.
  2. Anyone should be able to create a new account. You do not need to implement email-verification. The account consists of a username, password, name, email, office. Anyone with an account is a registered user.
  3. You can store the user name and passords in a file. You don't need to use https or HTTP authentication (but, you can, if you want to).
  4. The search is a simple keyword search over book title, author, and keywords. It should search over all books.
  5. The books returned by the search should show if they are currently on loan or not. Only registered users should be able to see the owner of a book.
  6. In the search results, each book should appear only once, even if more than one person has a copy of it.
  7. A registered user should be able to
    1. Add new books. Each book consists of a title, author, ISBN, keywords.
    2. Mark a book as borrowed, along with the date when the book is to be returned.
    3. Mark a borrowed book as returned.
    4. He should also have a personalized home page which shows all his books and all his borrowed books ordered by due date (with overdue books highlighted).
  8. Every page must have a link like this one to the XHTML validator so I can check if it complies with the standard. Note that that page links to another one which checks the validity of the CSS. I will be checking both. NOTE: since the link does not work within the University you should make sure that you check all your pages by uploading them to the validator's main page.
  9. The database should remain even if the servlet server goes down. You should not use an actual SQL database, instead you should write and read from a text file. You can assume that the whole database fits in memory (a reasonable assumption).
  10. The servlet should behave reasonably if the user fails to fill in a text box or makes a typo. Namely, it should not crash, ever.
  11. It needs to run on the lab machines (details to appear)
  12. Code should be commented. All classes must have a comment explaining their role.
  13. You also need to submit a short writeup that explains how your servlet works. It should include an UML class diagram. This writeup will be in an HTML file that is linked to from your servlet's start page.

Submission Instructions

As will all the problem sets, you will hand them in using our department's dropbox. Follow this link to upload your problem set. You should make a .war file of your servlet and submit that file. Your writeup should start with the following text:

Name(s):
email(s):

I understand that it is the responsibility of every member of the Carolina community to uphold an maintain the academic standards and integrity of the University of South Carolina. Any member of the University community, who has reasonable grounds to believe that an infraction of the Code of Student Academic Responsibility has occurred, has an obligation to report the alleged violation.

I certify that I have neither given nor received unauthorized aid on this problem set.


Comic strip.


Last modified: Fri Feb 6 16:59:54 EST 2004