You have collected reviews from four movie reviewers where the reviewers are numbered 0-3. Each reviewer has rated six movies where the movies are numbered 100- 105. The ratings range from 1 (terrible) to 5 (excellent). The reviews are shown in the following table: 100 101 102 103 104 105 3 5 2 1 5 1 4 2 4 2 4 3 1 2 4 4 1 3 5 1 4 4 2
Addition of Two Numbers
Adding two numbers in programming is essentially the same as adding two numbers in general arithmetic. A significant difference is that in programming, you need to pay attention to the data type of the variable that will hold the sum of two numbers.
C++
C++ is a general-purpose hybrid language, which supports both OOPs and procedural language designed and developed by Bjarne Stroustrup. It began in 1979 as “C with Classes” at Bell Labs and first appeared in the year 1985 as C++. It is the superset of C programming language, because it uses most of the C code syntax. Due to its hybrid functionality, it used to develop embedded systems, operating systems, web browser, GUI and video games.
please use c++ to answer the following question
![You have collected reviews from four movie reviewers where the reviewers are
numbered 0-3. Each reviewer has rated six movies where the movies are numbered 100-
105. The ratings range from 1 (terrible) to 5 (excellent).
The reviews are shown in the following table:
100
101
102
103
104
105
3
1
5
2
1
5
4
2
1
4
2
4
2
3
1
2
4
4
1
3
5
1
4
2
4
2
Write a class that stores this data using a 2D array. Based on this information your
class' member predictRating should allow the user to enter ratings for any three movies. The program should
then find the reviewer whose ratings most closely match the ratings input by the user. It
should then predict the user's interest in the other movies by outputting the ratings by the
reviewer for the movies that were not rated by the user. Use the Cartesian distance as the
metric to determine how close the reviewer's movie ratings are to the ratings input by the
user. This technique is a simple version of the nearest neighbor classification algorithm.
For example, if the user inputs a rating of 5 for movie 102, 2 for movie 104, and 5 for
movie 105, then the closest match is reviewer 0 with a distance of sqrt ( (5-5) ^2 + (2-
1) ^2 + (5-5) ^2) = 1. The program would then predict a rating of 3 for movie 100, a
rating of 1 for movie 101, and a rating of 2 for movie 103.
Note: User the STL Array/vector to create a 2D array/vector. To store the data in a 2D array the movie ID's must be mapped to 0-5. Store -1 to
represent unrated movies.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F902b1693-09a9-4849-a7f5-ed5b828f0e76%2Ffba2fed6-16ea-468d-a1e2-fb6da40a5ea8%2F7gd828hj_processed.png&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)