Create a program that maintains the required book catalog for the circulation desk of a library. The book catalog is to be maintained in sorted order. The list is initialized from information stored in the file 'AvailableBooks.txt'. The available book information is to be read from an input file which adds the book title, author and is for each book. The librarian interacts with the list through an interactive menu. The menu would let the librarian to return books, lend books and check if a book is required. In addition there could be a menu option that lets the librarian to print the list of available books at any given time in two modes: in sorted order by book title or in sorted order by author. The quit option could save the current list of available books into the file 'AvailableBooks.txt'. The entire session should be sent to the screen as well as output file 'Session.txt'.
Specific Instructions:
Your program should aid a librarian on a circulation desk to return - lend or check availability of books. The list data is kept sorted alphabetically by book title. The format for the input and output filesare given below:
AvailableBooks.txt Session.txt
|
|
|
|
|
Baby Day!
Nancy Elizabeth Wallace
978054735808
Huckle's Opposites
Richard Scarry
97815725158061
Froggy Eats Out
Jonathan London
0439396441
Froggy's First Kiss
Jonathan London
0590376098
Froggy Learns To Swim
Jonathan London
059027452X
The Peace Book
Todd Parr
0316835315
|
|
|
Welcome to the Children's Library!
1. Return Book
2. Lend Book
3. Check Availability
4. Print List
5. Quit
Choose Option: 2
Book Title: Froggy Eats Out
1. Return Book
2. Lend Book
3. Check Availability
4. Print List
5. Quit
Choose Option: 3
Book Title: The Peace Book
This book is available.
...
...
...
|
|
|
You to use STL containers and algorithms that you find appropriate. In particular, attempt to remove all loops from the application.