CIS 28-061

CIS 28-061 OO Analysis and Design Midterm Problem
Winter 2020 Ron Kleinman
College Library Inventory Application

Functional Specification
Every book in the new De Anza library has a title, publisher, author, edition and "type" (fiction or nonfiction),
and is uniquely identified by its ISBN (International Standard Book Number). All copies of nonfiction
books are arranged on the shelves by Book catalog number (ex: 710.46E), while all copies of
fiction books are arranged alphabetically by author / title.
There may be zero or more copies of any given book on the shelves. Any or all of them may be soft
cover copies (i.e. paperbacks). Each copy of every book in the library (fiction or non-fiction) has a
distinct bar code, which is “stringified” by the bar code scanner during the checkout procedure. This
string uniquely identifies the copy.
A non-fiction book may or may not be a reference work (ex: expensive Art Book), but all reference
books are non-fiction. No reference book ever has a soft cover copy. There are separate shelves set
aside for hard covered fiction, non-fiction and reference works, and a separate rack for all soft cover
fiction.
All borrowers need a library card, which has their name on the front, and a “bar code” on the back
which uniquely identifies the borrower. Every library card also has an expiration date. If the borrower
does not renew the card before then, the card expires and can no longer be used to borrow anything.
Any student or teacher at De Anza with a library card may borrow (check out) copies of books. They
may do so by using the scanner which sits in the lobby of the library to read the unique bar code on
their library card, and the unique bar code stamped on the copy of every book they are checking out.
They may also go to the front desk where the librarian will check out the material by scanning the card
and book copy bar codes for them.
A copy of any book may normally be checked out for 10 days, but copies of reference books may only
be checked out by teachers, and then only for 3 days. An individual copy is either checked out,
unavailable for a variety of reasons, or on the library shelves. A security system prevents theft.
No borrower (student or teacher) who has a copy of an overdue book checked out, or has 4 other
copies checked out, may check out another copy of any book. Late fees are 25 cents per day per
book, except for copies of reference books which have fines of one dollar per day. No reference book
ever has a soft cover copy.
College Library Inventory Application page 2
USE CASES:
This page contains the totality of what the Library System is required to do (at this time). It is not
necessary to overdesign for this midterm. If your solution design supports nothing more than these
use cases, it is a perfect solution.
Transactions

  1. Add a new purchased copy of a book to the library's current inventory.
    Remove an existing copy from the inventory due to damage or loss.
  2. Verify that a specified borrower can check out a specified book copy.
    Process a borrower legally checking out a book copy.
  3. Process the return of a book copy
    Reports

    1. Overdue: For each borrower with overdue material, return
      Borrower: Name, "type of borrower" and library card barcode number
      For each overdue Item held by that borrower:
      Title, author, bar code, date checked out, and amount currently owed
    2. Inventory: For each book in the library inventory, return:
      Title, author, type, ISBN #, catalog # (if applicable)
      For each copy:

    Status
    Soft cover or not
    If checked out:
    Date checked out
    Date due back
    Amount owed (if any)
    Borrower name, type and card #
    Queries

  4. Return all information on a borrower (see above), given the library card bar code #
  5. Return all information on a copy (see above), given the copy bar code #

你可能感兴趣的:(后端)