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 highest-rated and lowest-rated movies along with their ratings.
Objective: Using ArrayLists to store and access different types of data.
Sample Output:
Enter number of movies: 3
Enter title of movie 1: Avatar
Enter rating for Avatar: \(\mathbf{7.8}\)
Enter title of movie 2: Inception
Enter rating for Inception: \(\mathbf{8.8}\)
Enter title of movie 3: The Batman
Enter rating for The Batman : 7.5
All Movies and Ratings:
Avatar: 7.8
Inception: 8.8
The Batman : 7.5
Highest-rated Movie: Inception with rating 8.8
\(553700.4413630.9\times 3 z 9 y 7\)
LAB
54.18.1: (LAB) Fun with Lists
MovieRatings.java
Load default template...
```
import java.util.ArrayList;
import java.util.Scanner;
public class MovieRatings {
public static void main(String[] args){
Scanner input = new Scanner(System.in);
//Ask user to input movies and ratings
//Print all movies and ratings
// Find and print highest and lowest rated movies
input.close():
```
In this lab, you will develop a simple 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 Programming Questions!