Search for a Book

Search For a Book

Interface Definitions

The `Search for a Book' module is called by the Book Administration module . Search for a book will accept one or more of the input fields title, author, subject, and/or call number. These fields will permit a typed string to be entered and perform type ahead by executing the search as each character is typed in. For example, when an `a' is entered in the subject category, then all subjects beginning with `a' will appear. When a `r' is typed in next, all subjects beginning with `r' will appear. The output is a list of books found as just described and sorted according to which ever field the user is presently typing in. This information will be available in a list box below the input fields with a scroll bar for viewing. If the user chooses to, he/she can click on one of the items in the list and the input fields will be completed. There will also be a cancel button to permit the user to exit the module and return to the main menu.

Data Abstractions
author = "string"

call # = "string"

subject = "string"

title = "string"

Design
The interface would require a window titled `Search for a Book', containing four text boxes are aligned in a such that there are labels "Call Number: ", "Title:", "Author:", and "Subject:" all left justified followed by text boxes on the right of an equal length and also left justified. The text boxes will accept typed input and can be maneuvered between by using the tab bar. Below this will be the command button `cancel' and a list-box with a scroll bar containing all of the information on book that has resulted from the query.

Sub-Modules

Error Handling

Imports

EXPORTS

Pseudocode/Visual Basic Code

PSEUDO-CODE:Search Book

   
// Search window.
   Switch on button presses:
      begin
         Case SEARCH pushed:
            begin
               If all textboxes are empty 
                  do nothing
               Else 
                  begin 
                     do search
                     if search is successful
                        begin
                           clear listbox
                           populate list box with new matches
                  end
            end
         Case CANCEL pushed:
            Exit this window and return to calling window.      
      end



Back to the Book Functions Index