Remove a Borrower
Remove a Borrower
Interface Definitions
- Calls Search for Borrower
Inputs from the user:
- ID number of the person being sought
- Name of the person being sought
- Any Borrower information fields can be filled in. A list of
all the possible matches appears on the bottom of the screen -
the search is complete when only one match remains, or the Librarian
selects a borrower from the match list.
- A confirmation if the Borrower is to be deleted.
Outputs to the user:
If Successful:
- A message confirming the deletion, and returns to caller.
Data Abstractions
- Accesses the Borrower data store.
- Accesses the Fines data store.
Design
- The Search for Borrower window appears, and once the Librarian
has isolated a specific borrower, they have the opportunity to
delete.
- If the borrower has outstanding fines, they may not be deleted.
Fines would have to be cleared in the Fines module first.
Sub-Modules
Error Handling
Search Unsuccessful:
- The list of matches would remain empty.
Syntax Errors in ID or name:
- User is informed of a syntax error.
- The proper format for data entry is explained. The user can
then edit their old input and search again, or abort.
Imports
- Reads the Borrower data store.
- Reads the Fines data store.
Exports
- Does not export anything to other functions.
- Alters the Borrower data store.
PseudoCode/Visual Basic Code
Remove Borrower
calls search for borrower
if (cancel) then exit remove borrower
if (one borrower is selected || only one item remains within search screen) then
remove search window
if (selected borrower.fines > $0.00) then
errorbox "Borrower has outstanding fines and cannot be removed"
when (ok) is pressed return to search for borrower
else
display remove window containing chosen items information
end if
if (Remove button pressed) then
messagebox "Are you sure you want to delete " & first and last name of borrower & " ?"
if (Yes) then
Remove item from database
Return to search for borrower
else
Return to search for borrower
end if
end if
end if