Problem: Study how a library operates and develop a software application to model the process for borrower registration, item checkout, and return. In this project, items available for checkout and return includes books and music. All dialog will use the console window.
The user of this system is the librarian. Features include listing of items and availability (#copies on hand). Available items can be checked out and returned. Items available for checkout include books and music. For each type of item, multiple copies may be available. The librarian needs to be able to see the history for each borrower. User commands include (1) Display items and quantity on hand, (2) Check-out item, (3) Return item, (4) Display borrower’s history, and (5) Quit.
To better organize your tests, build a table of the test data and the expected results. This table may be done using a spreadsheet program or word processor. Test your program for each of the following cases. In the last column, indicate Yes or No, as to whether or not your program's output agrees with your expectations. Add one additional test case of your own choosing. See image.
Initial System Status
Borrowers on File: (ID, name)
001 – D. Manson
002 – Z. Ma
003 – S. Curl
Inventory (Books): (code, name, medium, author, genre, quantity on hand)
HPDH-1,2,3 – Harry Potter and the Deathly Hallows, Book, J.K. Rowling,Wizarding, 784 pages, 3
CSH-1,2 – The Complete Sherlock Holmes, Book, Sir Arthur Conan Doyle, Who Done it, 944 pages, 2
PL-1 – Pirate Latitudes, Book, Michael Crichton, Adventure, 320 pages, 1
Inventory (Music): (code, name, medium, artist, genre, format, quantity on hand)
HWGA-1,2,3, Here We Go Again, Music, Wynton Marsalis, blues, audio CD, 3
MC-1,2, McCartney, Music, Paul McCartney, rock, MP3 download, 2
Besides the above, include three more music selections of your own choosing.
This project requires the following classes and methods for successful implementation. . These structures can be supplemented as necessary. Arguments and return values are a minimum but may be extended. You are to create any remaining classes, variables, and methods as appropriate for your program design.
Note: Assume this is a new system and no items have been checked out when the program starts. I- Test cases should be consistent with the output from the menu options for (1) display items & quantity on hand and (2) display borrower’s history.
When the application starts, use a JOptionPane showMessageDialog to display a welcome message form. Your form should include the title Library System, an exclamation icon (!), the message Welcome to the Library! (or something similar), the message Click OK to begin, and an OK button. Clicking OK will close the form and continue the application (see example below). See image.
With extra credit #1 complete, have the program confirm exiting the application. Use a JoptionPane showOptionsDialog with buttons for Yes and No. If Yes, close the application; if No, continue as if nothing happened. The title is Library System; use a question mark for the icon, plus an appropriate message. The default button should be set to No (see example below). See image.