Write below code in C++ We are going to make a C++ program named “Library Manage
ID: 3768008 • Letter: W
Question
Write below code in C++
We are going to make a C++ program named “Library Manager”. The program
manages books for a library (adding, removing, checking in/out, and so on). The
main menu is following.
1. Add a new book
2. Remove a book (input ISBN)
3. Check out a book (input ISBN and the due date)
4. Check in a book (input ISBN)
5. Display all book details (along with their specialization)
6. Display all available book details
7. Display all checked-out books
8. Exit program
The main menu will repeat to display until the user select menu 8.
Each book has following properties such as ISBN, title, and so on (please see the
next page). Please create a “Book” structure consisting of the members. Then,
you have to ask such information of a book to a user when adding a new book.
Please check if the input is valid or not.
In this program, ISBN is a key, which means an identifier of a book (i.e., we
assume that there is only one book of the ISBN in this library, though it’s
unrealistic in practice). When adding a new book, you have to check if there is the
same ISBN already stored in the library. If so, you have to give an error message
to a user and ask again to input a different ISBN.
1. Has an ISBN (10 digits): e.g., 1001234567
2. Has a title (string): e.g., C++ Programming Language
3. Has a type (string): e.g., textbook, magazine, journal, newspaper, novel, and other
4. Has a publisher (string): e.g., TAMUC
5. Has a page information (how many pages) (integer): e.g., 506
6. Has a price (float): e.g., 20.00
7. Has a publication year (integer): e.g., 2013
8. Has a status (integer): e.g., 0=available, 1=checked-out
9. Has a name who checked out the book (string): e.g., Tommy
10. Has a due date (Date): use Date structure
Please use the “Date” structure for “Due Date” described as,
struct Date
int nYear;
int nMonth;
int nDay;
The Library manager may have a 1D array of the Book structure. You can define
the maximum book number (e.g., 100) that the library can store.
Explanation / Answer
pogram :
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.