Question: Write in Java please! following attributes: - The movie name - The MIPAA rating - The number of people that have rated this movie as
Write in Java please!

following attributes: - The movie name - The MIPAA rating - 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 according to the following specifications: - Write a constructor that creates the class with movie name, and MIPAA rating. All the ratings should be set to their default values of 0 . - Write a method addRating(int, that takes an integer as an input parameter. The method should verify that the parameter is a rating between 1 and 5 , and if so, increment by 1 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 3 should be incremented by 1 . If the rating is not between 1 and 5 (inclusive) it must be ignored. - Write another method getAverage () that returns the average value for all the ratings. Write a test client TestMovieRating.java to the test the class. The test client should prompt the user to: - Input the name of the movie. - Input the MIPAA rating of the movie. - Keep prompting the user to enter the rating for the movie, until the user enters 1. Once the user enters 1, the client prints the name of the movie, the MIPAA rating, and
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
