PseudoCode |
/* Main functionality Procedure CancelBookOnHold processes the request to cancel a book with specified Call Nuber, which has been on hold for a patron with given User ID. */ Procedure CANCEL_BOOK_ON_HOLD { while (1) switch (kind_of_button_pressed) { case CLEAR: clear the contents in the entry field; case HLEP: open new pop-up window displaying help; case CANCEL: close the Hold a Book window and return control to the Book Administration Window; case SEARCH: /* search the User Id */ search for the patron ID by poping up the Searching Customer window; case LIST: display a list of all the books on hold by the customer with the given Customer ID. case PRINT: prints a list of books being held by this patron. case OK button: if (syntax for User ID is not correct) display error message about the User ID; else if (syntax for Call Number is not correct) display error message about the Call Number; else if (User Id does not exist in database) display non-existent input error message; else if (Call_Number does not exist in database) display non-existent input error message; else { retrieve the customer's record from the database; if the customer dosn't have this on on hold display message("Cancel a hold was unsuccessful: The patron doesn't have this book on hold."); else { update the customer record; retrieve the book's record and change the book's circulation_status to 'available'; display message( "Cancel a hold is successful"); } } } }
Document Navigator For The Design Index (Testing Document) | ||||||
---|---|---|---|---|---|---|
|
Send mail to the Group Leader
or the Webmaster
Pages created and maintained with Mortar