Add a New Book
To add a new book to the library database system the librarian must access this function through the book administration option and from there select from the pull down menu to add a new book. The following information will be required for a book to be added to the database:
Inputs by user:
Outputs:
"Adding book to database."
"Proceed with addition?"
Data Abstractions:
Design:
Environment: GUI (graphical user interface)
Interface: Pop-up window. (See picture files for
a view.)
Every item from Data Abstraction will be entered
in it's own text-box.
These text-boxes will allow strings larger than the text-box size
to be entered.
The update will be a batch process. i.e. none of the new information
entered will be updated until the update-Borrower button/key is
activated.
When the button/key is entered certain items will
be checked for syntactical errors (for errors see ERROR HANDLING).
Completion of this module is performed by:
At Confirmation Window:
Sub-Modules:
Error-Handling:
Whenever an error occurs the user will be prompted
by a message specifying what input is wrong. It will then allow
the user to either make corrections and recommit the book or cancel
the entire process.
Imports:
Exports:
PSEUDO-CODE:Add Book // Add window. Switch on button presses: begin Case ADD pushed: If Check_TextBoxes() is successful begin popup Verify message box If Verify is YES Add record to database. end Case CANCEL pushed: Exit this window and return to calling window. // Check_TextBoxes function Check_TextBoxes() begin If call # is already in use or call # is invalid begin popup error message box return UNSUCCESSFUL end If subject is not one of the existing subjects begin popup Verify message box If Verify is NO return UNSUCCESSFUL end If Type is not one of the possible types(reserved,circ,etc) begin popup error message box return UNSUCCESSFUL end If Location is not one of the existing locations begin popup Verify message box If Verify is NO return UNSUCCESSFUL end // If we've got to this point we're OK return SUCCESSFUL end