In this assignment you will create a program that maintains the available 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 includes 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 available. In addition there should 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 should 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’.
Your program must help a librarian on a circulation desk to return/lend/check availability of books.The list data is kept sorted alphabetically by book title.The format for the input and output filesare given below:
Nancy Elizabeth Wallace Welcome to the Children’s Library!
978054735808 1. Return Book
2. Lend Book
Huckle’s Opposites 3. Check Availability
Richard Scarry 4. Print List
97815725158061 5. Quit
Choose Option: 2
Froggy Eats Out Book Title: Froggy Eats Out
Jonathan London 1. Return Book
0439396441 2. Lend Book
3. Check Availability
Froggy’s First Kiss 4. Print List
Jonathan London 5. Quit
0590376098 Choose Option: 3
Book Title: The Peace Book
Froggy Learns To Swim This book is available.
Jonathan London …
The Peace Book
You utilizeSTL containers and algorithms which you find suitable. In particular, attempt to eliminate all loops from the application. Include all source code (well documented) and sufficient representative output.