Question: * DO NOT WRITE THE CODE IN C . * PLEASE WRITE IN C + + show me the screenshot of the output. (
DO NOT WRITE THE CODE IN C
PLEASE WRITE IN C
show me the screenshot of the output.should be run well
All of the following programs should be written in C
Implement a simple library management system. The system has a user interface to accept user command with a prompt and respond accordingly. To make your life easier, lets assume that the number of customers and the number of books The following are the user commands that can be accepted:
addbook bookID booktitle
Add a new book to the library given the book ID number and the book title. You should check if the bookID number already exists in the system. If it is let the user know. Here lets assume that the booktitle is a character string without the space characters.
addcustomer customerID customername
Add a new customer of the library, given the customer ID number and the name. You should check if the customerID number already exists in the system. If it is let the user know. Here lets assume that the customername is a character string without the space characters.
checkb bookID
List the information for the given book ID The book information includes ID title, and status borrowed or on shelf
checkb booktitle
List the information for the given book title. The book information includes ID title, and status borrowed or on shelf Note that different books may use the same name.
checkc custormerID
List all the books borrowed by the customer, given the ID number.
borrow bookdID customerID
Perform the book borrow action. If the book was already borrowed, you should prompt for the information.
return bookID
Perform the book return action. Of course, you cannot return a book that has not been borrowed.
listbook
List all the books in the system.
listcustomer
List all the customers in the system. The customer information includes ID and name.
exit Exit the program
If the user type any other commands, just prompt for unknown command You should design the underlying data structure to support the above commands. A sample run of the program is shown below, please follow the output format in the sample:
Welcome to the library management system, please type your commands.
listbook
There is no book in the system.
listcustomer
There is no customer in the system.
addbook book
book added to the system.
addbook book
The book ID alre QM ady exists.
addbook book
book added to the system.
checkb
book on shelf
addcustomer name
name added to the system.
addcustomer name
The customer ID already exists.
addcustomer name
name added to the system.
borrow
Success! book is borrowed by name
checkb
book borrowed
borrow
Fail! The book was borrowed by another customer.
listbook
book borrowed
book on shelf
checkc
Book borrowed by name:
book
return
Success! The following book has been returned:
book
return
Fail! The book has not been borrowed.
blahblah
Unknown command!
exit
Exit the system!"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
