Question: java only asap 10. Consider a class Movie that contains information about a movie. The class has the following attributes: The movie name The MPAA

java only asap
 java only asap 10. Consider a class Movie that contains information

10. Consider a class Movie that contains information about a movie. The class has the following attributes: The movie name The MPAA rating (e.g., G, PG, PG-13, R) The number of people who have rated this movie as a 1 (Terrible) The number of people who have rated this movie as a 2 (Bad) The number of people who have rated this movie as a 3 (OK) The number of people who have rated this movie as a 4 (Good) The number of people who have rated this movie as a 5 (Great) Implement the class with accessors and mutators for the movie name and MPAA rating. Write a method addRating that takes an integer as an input parameter. The method should verify that the parameter is a number etween 1 and 5, and if so, increment by one the number of people rating the movie that matches the input parameter. For example, if 3 is the input parameter, then the number of people who rated the movie as a 3 should Incremented by one. Write another method, getAverage, that returns dit the class by writing a main method that creates at least two movie A rating, and average rating for each movie object. the average value for all of the movie ratings. lects, adds at least five ratings for each movie, and outputs the movie

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!