In this project, you should develop a library management system application using structures and files. More specifically, your application should enable a user to read and write book details to a file (books.txt). The file should store the following information for the books. One line 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 presented menu. 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 the program (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 will search for all the titles that contain this keyword and display all the information of the corresponding books. ▪ Search by the author: The user will give the full name of an author and the 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 will display 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 number of 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) the user 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 the appropriate 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 so that the file remains sorted after the addition of the new book. You can implement this bonus 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 structure Author to store the first name and surname of the author. The structure Author will be 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 file as follows: Project2.cpp 5. The examiner will attach great importance to the quality of code. Marks will be deducted for poor programming style. The program should be commented and indented to aid clarity. 6. You may only use the C++ programming concepts covered so far in class. Do not use material that was not covered in this class. You are allowed to use only Cstring library not String

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

In this project, you should develop a library management system application using structures
and files. More specifically, your application should enable a user to read and write book
details to a file (books.txt). The file should store the following information for the books. One
line 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 presented
menu.
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 the
program (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 will
search for all the titles that contain this keyword and display all the
information of the corresponding books.
▪ Search by the author: The user will give the full name of an author and
the 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 will
display 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 number
of 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) the
user 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 the
appropriate 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 so
that the file remains sorted after the addition of the new book. You can implement this
bonus 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 structure
Author to store the first name and surname of the author. The structure Author will
be 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 file
as follows: Project2.cpp
5. The examiner will attach great importance to the quality of code. Marks will be
deducted for poor programming style. The program should be commented and
indented to aid clarity.
6. You may only use the C++ programming concepts covered so far in class. Do not use
material that was not covered in this class. You are allowed to use only Cstring library
not String

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 3 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY