Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Code in C++ Write a menu driven program that depicts the working of a library. In this regard, you must first create a structure called
Code in C++
Write a menu driven program that depicts the working of a library. In this regard, you must first create a structure called book to hold the ID, title of the book, author name, price of the book, and flag indicating whether book is issued or not. Your program can create a (partially-filled) array named 'books_data' of 'book' structure to hold the information of books present in the library. The maximum capacity of books is 500. The program should display different options to user for manipulaing the books information. The menu options should be: 1. Add book information: This option will add the book to the end of books_data array. Should display an array, if books capacity is full (i.e. already added 500 books) 2. Display book information: This option will ask the user to enter book id and show the book information (e.g. name, price etc.) after searching it in the books_data array. 3. List all books of given author: This option will ask the user to enter book author name and show the book information (e.g. name, price etc.) after searching it with author name in the books_data array. 5. List the count of unisssued books in the library: 6. List the books in the order of ID: you will have to sort books according to books ID. 7. Save books information: This function saves all books information from the books_data array into a file named 'books.txt'. 8. Load books information: This function loads all books information from a file named 'books.txt' into the books_data array. 9. Exit Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started