Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello i have java programming assignment could you help me? We should use hashmap You have collected a file of movie ratings where each movie

Hello i have java programming assignment could you help me? We should use hashmap image text in transcribed
You have collected a file of movie ratings where each movie is rated from 1 (bad) to 5 (excellent). 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 Half-Blood Prince Harry Potter and the Half-Blood Prince Army of the Dead Harry Potter and the Hal-Blood Prince Army of the Dead The Uninvited Pandorium 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 and review counts. Here is the desired output for the sample data: Harry Potter the Half-Blood Prince: 3 total reviews, average of 4.3/5 Rate 4: 2 review Rate 5 Army of the Dead: 2 total reviews, average of 1.5/5 Rate l Rate 2 The Uninvited: I total review, average of 475 Rate 4 Pandorium: I total review, average of 3/5 Rate 3 I review I review I review review I review Use a HashMap or multiple HashMaps to calculate the output. Your map(s) should index from a string representing each movie's name to integers that store the total number of reviews and each number of reviews of movie For example, Total Reviews: 3, Rate eview, Rate 2: 2 reviews, Rate 3: 1 review, Rate 4: 1 review, Rate 5: 1 reviews

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Sham Navathe,Ramez Elmasri

5th Edition

B01FGJTE0Q, 978-0805317558

More Books

Students also viewed these Databases questions

Question

How to cite textbook page in APA format

Answered: 1 week ago

Question

=+ 4. Why should policymakers think about incentives?

Answered: 1 week ago

Question

=+ 2. What is the opportunity cost of seeing a movie?

Answered: 1 week ago

Question

=+ what roles should government play in them ?

Answered: 1 week ago