Question: Write a Library class such that libraryDriver.cpp can make use of functions in the Library class to create a book recommendation system. The Library class

Write a Library class such that libraryDriver.cpp can make use of functions in the Library class to create a book recommendation system. The Library class should have the following two private data members: an array of Book objects books an array of User objects users The libraryDriver program will need to have the following features: 1. Load book data and user data from text files. A user must be created for ever user in the ratings.txt file, and a book must be created for every book in the books.txt. 2. a) Login. (There are no passwords. Anyone can log in as anyone else simply by providing their name.) After the data is loaded, welcome the user to the library and ask them to enter their name. If a user has interacted with the system before, the system should remember the user's previous ratings. 2. b) Add new user. If it is a user's first time interacting with the system, they should be added to the list of users. After welcoming the user, present the user with 4 choices: 1. View your ratings 2. Rate a book 3. Get book recommendations 4. Quit The user is asked to choose one of the menu options by entering one character for each option: v, r, g, q 3. View all your own ratings. A user should be able to see all the books they have provided ratings for. Recall that a rating of 0 means a user has not rated that book and hence shouldnt be displayed. 4. Rate a book. A user should be able to rate books. If the user chooses to rate a book, the user will be prompted first to enter the title of the book. If the title of the book already exists in the system, then the user will be asked to provide the rating value. If the title does not exists, prompt the user to enter a new title. Even if the user has already rated a book, they should be able to enter a new rating value. 5. See recommended books. To generate recommendations for a user, for example the user named ben: Find the most similar user to ben. Lets say we found claire to be most similar . Find at most 10 books claire has rated with a rating of 3 or 5 that ben has not yet read (rating 0) If there are less than 10 books to recommend, recommend as many as possible. Ben will be presented with 0 to 10 recommendations. 6. Quit. This must automatically save all updated data to the file ratings1.txt. If a user rated a book, this new rating should be reflected in the file. If a new user was added, they should show up at the very end of the ratings.txt file. The file sampleRuns.txt contains examples of possible user input scenarios. Your program should generate the same output given the input files provided on moodle. The test cases on the autograder will correspond to these sample runs. If the user choose to quit, save the data to ratings_new.txt (this is so the autograder can evaluate your file). in c++

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!