Reference no: EM1350851
Design an interactive program that does the following, using the prewritten methods whenever they are appropriate.
Prompt the user for and read a library card number, which must be between 1000 and 9999.
Prompt the user for and read a search option- 1 to search for a book by ISBN, 2 to search for a book by title, and 3 to quit. If the entry is invalid, repeat the request.
While the user does not enter 3, prompt for an ISBN or title based on the user's previous selection. If the user enters an ISBN, get and display the book's title and ask the user to enter a " Y" or " N" to confi rm whether the title is correct.
If the user has entered a valid ISBN or a title that matches a valid ISBN, check whether the book is avail-able, and display an appropriate message for the user.
Th e user can continue to search for books until he or she enters 3 as the search option.