Question: Java programming language use You have collected a file of movie ratings where each movie is rated from 1 (bad) to 5 (excellent). The first
Java programming language use You have collected a file of movie ratings where each movie is rated from 1 (bad) to 5 (excellent). The first line of the file is a number that identifies how many ratings are in the file. Each rating then consists of two lines: the name of the movie followed by the numeric rating from 1 to 5. Here is a sample rating file with four unique movies and seven ratings: Harry Potter and the Order of the Phoenix Harry Potter and the Order of the Phoenix The Bourne Ultimatum Harry Potter and the Order of the Phoenix The Bourne Ultimatum 4 Wall-E 4 Glitter Write a program that reads a file in this format, calculates the average rating for each movie, and outputs the average along with the number of reviews. Here is the desired output for the sample data: Glitter: 1 review. Average of 1/5 Harry Potter and the Order of the Phoenix: 3 reviews, average of 4.3/5 The Bourne Ultimatum: 2 review, average of 3.5/5 Wall-E: 1 review. Average of 4 /5 Use a map of multiple maps to calculate the output. Your map(s) should index from a string representing each mov of reviews for the movie and the sum of the ratings for the movie ie's name to integers that store the number
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
