Question: A library is a place where a user, once registered, can loan (and return) up to a certain number of books. For a user to

A library is a place where a user, once registered, can loan (and return) up to a certain number of books. For a user to loan a book, he/she must be registered, and a copy of the book must be present with the library. The library can add/delete a user, search for a book, search to verify how many books have been issued to a user, loan a book and receive a book back from a user. Assume a maximum of 50 books and 10 users can exist in the library at any one time. Also, assume a user can loan at max 3 books.

You're required to write a C++ code using functions that will perform each of the following tasks.

1. Add a new user to the system.

2. Delete an existing user from the system.

3. Search a user and display the number of outstanding books against him/her.

4. Loan a book to a user (both book and user must exist).

5. Return a book from a user.

6. Display a list of existing users (in sorted order).

7. Display a list of existing books and their status (available or borrowed).

The program MUST provide a friendly user interface (menu) to perform the above tasks. Your program MUST read and load at least 5 books and 2 users from a file (you need to look at reading from a file) that will be available at the start of the program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!