In this project, you should develop a library management system application using structuresand files. More specifically, your application should enable a user to read and write bookdetails to a file (books.txt). The file should store the following information for the books. Oneline per book and each field to be separated by tab.• Book ISBN• Book title• Author first name• Author surname• Year• Availability for loan [yes/no]The user of this application should have the following options in the form of a nice presentedmenu.Add a book: The user should add all the details of each book by answering a set of questions(book isbn? Book title? author? year?). The availability for loan is randomly generated by theprogram (y: yes, n:no). The book should be added at the end of the file.Search for a book: The user should be given three options here.▪ Search by the title: The user will input a keyword and the program willsearch for all the titles that contain this keyword and display all theinformation of the corresponding books.▪ Search by the author: The user will give the full name of an author andthe program will display all the information of the books by that author.▪ Search by year: The user will give as input a year and the program willdisplay all the information of the books published that year.Total # of books: Print all the books in the file, one on each line, and count the total numberof books in the file.Borrow a book: All the books that are available to borrow are displayed in the screen.After the execution of each one of the above options (the underlined phrases above) theuser should be asked if she/he wishes to select another option or exit the program.Your program should check if the file (books.txt) exists and if not it should display theappropriate error message.Bonus (+10%): Assume that your book catalogue is sorted (according to the book title).The “add book” functionality, should add the book to the appropriate place in the file sothat the file remains sorted after the addition of the new book. You can implement thisbonus question as an extra option 6. Add new book sorted and use two files for testing(books.txt and books_sorted.txt).
INSTRUCTIONS:1. Create the structure Book to store the details about the book and a second structureAuthor to store the first name and surname of the author. The structure Author willbe part of the structure Book.2. Create a file book.txt to write and read from the file.3. Use functions where appropriate.4. Submit the .cpp file by uploading it on moodle (.cpp file ONLY). PLEASE name the fileas follows: Project2.cpp5. The examiner will attach great importance to the quality of code. Marks will bededucted for poor programming style. The program should be commented andindented to aid clarity.6. You may only use the C++ programming concepts covered so far in class. Do not usematerial that was not covered in this class. You are allowed to use only Cstring librarynot String
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here