Transaction Return of a Book
Returning a Book
Interface Definitions:
Called by: Main module
Calls: Report on fines module
Inputs from user: Person's identification number, book's call number
Outputs: "Book successfully returned to circulation"
Data Abstractions:
- ID# is a positive integer number
CALL# is a 9-digit positive integer number
Design:
- pop-down menu choice of main menu's interface (q.v)
- librarian clicks on return a book choice
- dialogue box pops up: ENTER ID NUMBER:
- - present a delimiting format of n blank spaces to prevent syntax errors
- - dialogue box pops up: ENTER CALL NUMBER:
- - present a delimiting format of 9 blank spaces to prevent syntax errors
- - system then sends ID number as the query term to the BORROWER data store
- - if program finds ID number in database, then look at the person's BooksBorrowed (which
is also a member of BOOK structure) and any overdue books associated with any of those
borrowed books.
- - if BooksBorrowed shows no books are overdue, then program erases the CALL
NUMBER of the returning book from this BooksBorrowed List, and message box
pops up saying that book successfully erased from BooksBorrowed list.
- - if BooksBorrowed shows a certain number of books are overdue, system calculates
overdue cost for that day (taking into account the type of book, eg. reference,
or reserved, as well as the duration of overdueness)
- - message box pops up showing a listing of all the books the person has
overdue, along with
- - title and author of each overdue book
- - cost per day of each overdue book (generally, $10/day for reserved,
$1/day for circulation, but this may have been modified)
- - date each book signed out
- - date each book due
- - days each book is overdue
- - overdue cost of each book (days overdue * cost of book)
- - total cost of all overdue books
- - perhaps a reminder that the person cannot sign out any more books, or renew the returned one until all the overdue books are
returned (so the reminder reminds the librarian, so he can remind
the patron)
- - patron may pay fines now or let it go for another day(!). Librarian
thank patron for the return.
- - then system sends book's CALL NUMBER to ON_HOLD data store to check whether that
book has been reserved.
- - if not, then put the book's CALL NUMBER back into circulation, and
message box pops up telling librarian that book was successfully
returned to circulation
- - if so, then system adds book's CALL NUMBER to ON_HOLD list, then asks
librarian if they want to see the reserver's info
- - if so, then display reserver's name, phone number, etc (of course, the ON_HOLD list is constantly updated -- perhaps daily -- so
the librarian is always working with an updated list
- - if not, then message box pops up telling librarian that book
was successfully returned to circulation
Sub-Modules:
Error Handling:
- - if program cannot find ID number in database, message box pops up and informs librarian,
then exits. Librarian tells person he/she not in database and must register (see
ADD BORROWER)
- - if CALL NUMBER not found in BooksBorrowed List, then message box pops up saying the
person is trying to return a book not under his/her ID#
Imports:
- - accesses BORROWER data store for person's ID#
- - accesses BOOKS data store for book's CALL#
- - accesses FINE data store for check if ID# has any overdue books to report
Exports:
- - modifies FINE data store to remove returned book from fine's list
- - modifies BOOKS dats store update it's status from "out" to "circulating"