
- Library Management System Background The Purpose Of A Library Management System Is To Help Librarians Maintain The Or 1 (166.67 KiB) Viewed 104 times
[Library Management System] Background: The purpose of a library management system is to help librarians maintain the organization of new books and the books borrowed by others along with their due dates. It is required to support the main functionalities in this homework. A small-scale library is expected. Problem: Write a complete C++ program that implements a linked list to maintain an updated information for a book-list in a small library. The book information contains the type/filter, title, author, published year, and a unique ISBN code. By using this ISBN number, the user should be able to retrieve and update information on the book, such as the title, author, published year and whether it is available or not. Homework requirements: You are asked to implement two structures Book and Filter, and one class called Library as shown in the table below. • • Initially the there are no filters added. Both lists are empty. You start creating new filter/type when a new one appeared while adding new book to the list. When adding a new book, you first check the filter if exist the list, then you add the book in order based on the ISBN number. Otherwise, you are required to add new node of type filter in the corresponding list. The filter list must be sorted alphabetically. • struct Book { }; char filter [64]; char title[64]; char author [64]; int pub_year; int ISBN; }; bool borrowed; Book* next book; struct Filter { char name[64]; int id; Filter* next_filter; Book* head book; class Library { private: Filter *start; char* library_name; int c_filters;//number of stored filters. int c_books;//number of stored books. public: // default constructor; //copy constructor; // destructor; // overload operator = // overload operator +; Library + Book, this function add book in ascending order according to their ISBN in the suitable filter. // function to set the name of the library. // Overload <<, to print the books in their filter and ISBN order. //Overload operator>> to read from a file. Reading book information from the file must also be stored in ascending order (ISBN). };
Required Functions: Constructor. // initialize the size and the name of library. Copy constructor. Destructor. // delete the linkedlists correctly. set_libraryName(char*) update_book(int ISBN, int mode, char *). // update the book depends on mode for title/author/publish year/ borrow and return. delete book(int ISBN); removes the book from the list. Operator overloading for: O Operator = O Operator <<<for printing the entire data in the library similar to the table below in addition to availability of the book. O Operator>> read the information from a file. O Operator +: Library + Book, this function add book in ascending order according to their ISBN in the suitable filter. The following example of a file: intput.txt ISBN 0071002766 0198714742 0691140391 0132350882 0134081498 Start Author(s) Math Walter Rudin Jonathan Law, Richard Rennie Dennis S. The result of reading from the file input.txt: Library L1; ifstream in ("input.txt"); in>> L1; Physics Robert C. Martin Randall Knight Library A Programming NULL ISBN: 0071002766 Others... ISBN: 0134081498 Others... ISBN: 0132350882 Others... Title Real and Complex Analysis A Dictionary of Physics Matrix Mathematics Clean Code: A Handbook of Agile Software Craftsmanship Physics for Scientists and Engineers ISBN: 0691140391 Others... ISBN: 0198714742 Others... NULL Published year 1987 2015 2009 2009 2017 NULL NULL Type/Filter Math Physics Math Programming Physics