Question: In this lab, you will develop a simple movie rating program using ArrayLists. The goal is to read movie titles and their respective ratings from
In this lab, you will develop a simple movie rating program using ArrayLists. The goal is to read movie titles and their respective ratings from the user, store this information in two separate ArrayLists, and then print all movies and their ratings. Additionally, you will analyze the ratings by finding and printing the highestrated and lowestrated movies along with their ratings.
Objective: Using ArrayLists to store and access different types of data.
Sample Output:
Enter number of movies:
Enter title of movie : Avatar
Enter rating for Avatar: mathbf
Enter title of movie : Inception
Enter rating for Inception: mathbf
Enter title of movie : The Batman
Enter rating for The Batman :
All Movies and Ratings:
Avatar:
Inception:
The Batman :
Highestrated Movie: Inception with rating
times z y
LAB
: LAB Fun with Lists
MovieRatings.java
Load default template...
import java.util.ArrayList;
import java.util.Scanner;
public class MovieRatings
public static void mainString args
Scanner input new ScannerSystemin;
Ask user to input movies and ratings
Print all movies and ratings
Find and print highest and lowest rated movies
input.close:
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
