Question: This is an intro C++ class, please do not make the coding difficult, try to stick to only what you need nothing too extra. And

This is an intro C++ class, please do not make the coding difficult, try to stick to only what you need nothing too extra. And add comments through code :)

This is an intro C++ class, please do not make the coding

Problem 02: Movie Ratings (20 points) Consider a class Movie that contains information about a movie. The class has the following attributes The movie name The MPAA rating (for example, G, PG, PG-13, R) An array to store the movie ratings . The number of people that have rated this movie as a 1 (Terrible) The number of people that have rated this movie as a 2 (Bad) The number of people that have rated this movie as a 3 (OK) . . The number of people that have rated this movie as a 4 (Good) . The number of people that have rated this movie as a 5 (Great) Implement the class with accessor and mutator functions for the movie name and MPAA rating Write a function addRating that takes an integer as an input parameter. The function should verify that the parameter is a number between 1 and 5, and if so, increment the number of people rating the movie that match the input parameter. For example, if 3 is the input parameter, then the number of people that rated the movie as a 3 should be incremented by 1. Write another function, getAverage, that returns the average value for all of the movie ratings. Finally, add a constructor that allows the programmer to create the object with a specified name and MPAA rating. The number of people rating the movie should be set to 0 in the constructor. Test the class by writing a main function that creates at least two movie objects, adds at least five ratings for each movie, and outputs the movie name, MPAA rating, and average rating for each movie object

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!