Answered step by step
Verified Expert Solution
Link Copied!

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++
image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Programming The Perl DBI Database Programming With Perl

Authors: Tim Bunce, Alligator Descartes

1st Edition

1565926994, 978-1565926998

More Books

Students also viewed these Databases questions

Question

Explain the economic basis for international business.

Answered: 1 week ago

Question

4. Explain the strengths and weaknesses of each approach.

Answered: 1 week ago

Question

3. Identify the methods used within each of the three approaches.

Answered: 1 week ago