Question 1:  Write a program in C++ that implements a library management system. The program MUST use filing to manage library data. All the required methods must be implemented as member functions of the Book class. When program starts, it should display following menu and ask the user to make a choice: 1. Press 1 to add a new book in the library 2. Press 2 to display list of books available in the library 3. Press 3 to search a book by its name 4. Press 4 to delete a book by its ID 5. Press 5 to issue a book to the user 6. Press 6 to exit After user has made a choice, following actions must be performed: Case: User pressed 1 Record following details from the user and save in the file. If the file already exists then open the file for writing, otherwise create a new file. ● Book name ● Author name● Genre ● Number of pages ● Rating ● Language ● Issued to (User name) ● Issue date Case: User pressed 2 Open the file in input mode, read and display the details of all the books Case: User pressed 3 Ask the user to enter the name of a book. Open the file in read mode and search for the user-specified name in the file. If found, display the details of that book, otherwise display the message “Book not found” Case: User pressed 4 Ask the user to enter the ID of a book. Search that ID in the file and if found, delete that book from the file. Case: User pressed 5 Ask the user to enter the name of the book and his/her own name. Search the book from the file and save user name in the “Issue to” field and save the current date in “Issue date” field. Case: User pressed 6 Exit the program

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

Question 1: 

Write a program in C++ that implements a library management system. The
program MUST use filing to manage library data. All the required methods must
be implemented as member functions of the Book class. When program starts, it
should display following menu and ask the user to make a choice:
1. Press 1 to add a new book in the library
2. Press 2 to display list of books available in the library
3. Press 3 to search a book by its name
4. Press 4 to delete a book by its ID
5. Press 5 to issue a book to the user
6. Press 6 to exit
After user has made a choice, following actions must be performed:
Case: User pressed 1
Record following details from the user and save in the file. If the file already exists
then open the file for writing, otherwise create a new file.
● Book name
● Author name● Genre
● Number of pages
● Rating
● Language
● Issued to (User name)
● Issue date
Case: User pressed 2
Open the file in input mode, read and display the details of all the books
Case: User pressed 3
Ask the user to enter the name of a book. Open the file in read mode and search for
the user-specified name in the file. If found, display the details of that book,
otherwise display the message “Book not found”
Case: User pressed 4
Ask the user to enter the ID of a book. Search that ID in the file and if found,
delete that book from the file.
Case: User pressed 5
Ask the user to enter the name of the book and his/her own name. Search the book
from the file and save user name in the “Issue to” field and save the current date in
“Issue date” field.
Case: User pressed 6
Exit the program

Expert Solution
steps

Step by step

Solved in 2 steps with 8 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