Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The aim of the Movie Recommendation System is to provide information / recommendations to interested users for a set of movies. You are required to

The aim of the Movie Recommendation System is to provide information/recommendations to interested users for a set of movies. You are required to write a Python program that stores, processes, and retrieves information as specified below.
Specifications:
The program should display the following menu:
Movies Recommendation System
1. Add new Movie information
2. Update Movie information
3. Display information for all Movie
4. Display specific information
5. Save specific genre in new files
6. Exit
1. Adding new movies: This option allows the user to add movie information to the system. The fields for each movie are described in Table 1. Data should be stored in a file called movie.txt.
Table 1 Data specification
Field Specification Type of data Possible values
MovieID Movie identification String of 5 digits 00001
MovieName Name of the Movie String 60 Rules for Life
MovieAuthor The writer of the Movie String First_name Last_name
UserRating user rating Float value from 1 to 53.5
NumOfReviews Number of reviews Integer 1730
Revenue The revenue of the movie in millions float 100.0M,1.5M
Year The evaluation year Integer 2022
Genre The domain of the Movie
It might be 0: sport, 1: art, 2: economic, 3: comedy 4: fiction and 5: politics String Sport
Table 2 presents examples of valid data.
Table 2 Examples of Valid data
MovieID MovieName MovieWriter UserRating NumOfReviews Revenue Year Genre
12018 A Wrinkle in Time (Time Quintet) Madeleine L'Engle 4.5515320M 2018 fiction
12019 A Wrinkle in Time (Time Quintet) Madeleine L'Engle 4.4505020M 2019 fiction
22011 UP Disney 5.01000080M 2011 Fiction, art
The program should accept only valid names and values. Each Movie should have one record per year. The system should display an appropriate error message if the MovieID already has been reviewed for the same Year. For example, the data presented in Table 3 is not valid. This is because each movie should be reviewed once per a year.
You should ask the user to enter the number corresponding to the movie Genre, then write it in letters. For instance, if the user entered 0, this means the genre is sport and this is how it should be saved in the file. A movie can have up to 5 Genres, so you should ask the user how many Genres he will enter, if he entered a value larger than 5, then you should print an error message, then ask again.
When adding the new movie the MovieID should be automatically assigned. You should check the Movie Name, if the movie has the same name, then you should check the movie year, if the movie name and year are the same you should display an error and not add the movie, get the user back to the main menu. If the movie has the same name but not the same year, then the new id is the old id + the date. For instance, movie 1 is created in 2012 and the ID is 12012. The second review for the same movie is in 2013, then the ID should be 12013. The first number 1 is just a sequential number. The second number is the date of Review. So, to create the movieID you should check if the movie already exist, if it does use the same sequential number (ex; 1), else add one to the last existing sequential number and use that (ex; 2).(check Table 2)
Note that when the user Enter the MovieName, they may use upper or lower case letters, your code should be able to recognize if the same name is entered but with different letters (check table 3)
Table 3 Examples of NOT valid data
MovieID MovieName MovieWriter UserRating NumOfReviews Revenue ReviewYear Genre
12018 A Wrinkle in Time (Time Quintet) Madeleine L'Engle 4.5515320M 2018 fiction
12018 A Wrinkle in Time (Time Quintet) Madeleine L'Engle 4.4505020M 2018 fiction
12018 a wrinkle in time (time quintet) Madeleine L'Engle 4.4505020M 2018 fiction
2. Updating Movie information: this option allows the user to update UserRating, NumOfReviews, and Revenue. Once this option is selected, the program should ask for MovieName and Year, then retrieve Movie information based on MovieName and Year. For each field, the program should ask whether it needs to be updated or not. If it needs to be updated, the program asks for the new information. Once all information is entered, the program updates them and displays an appropriate message. The updated movie should be changed in the file as well.
3. Displaying information about all Movies: this option allows the user to display Movies information in a nicely formatted table. It has the following sub-options (select only 3 of the following sub-options)
o Sort by MovieID
o Sort by MovieName
o Sort by Genre
o Sort by Revenue
o Sorted by Year
4. Displaying specific information: this feature allows the user to display Movies information based on some specified criteria. It has the following sub-options: (select only 4 of the following sub-options)
View the top 5 selling movies in the last 10 years (sorted based on Year and UserRating).
Pri

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Semantics In Databases Second International Workshop Dagstuhl Castle Germany January 2001 Revised Papers Lncs 2582

Authors: Leopoldo Bertossi ,Gyula O.H. Katona ,Klaus-Dieter Schewe ,Bernhard Thalheim

2003rd Edition

3540009574, 978-3540009573

More Books

Students also viewed these Databases questions

Question

What is caplet floorlet parity? Explain your answer.

Answered: 1 week ago