Question: You are requested to develop a simple java program for a movie theatre. They need to store the following information: Movie name, year, genre, rating. The values are saved in txt files (choose any movies you like). Read the values from the txt files and store them in parallel arrays. Then calculate/ Find the following: The highest rating movie. The lowest rating movie. The oldest movie. The average rating for a chosen genre. Show your code + screenshots of the code and output.
THE QUESTION IS ATTACHED:
PLEASE AVOID USING
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
BECAUSE I HAVEN'T STUDIED THEM YET, YOU CAN USE 1D AND 2D ARRAYS.
YOU ARE FREE TO USE
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
EFFECTIVELY USE LOOPS AND CONTROL STATEMENTS.
TXT. FILE IS INCLUDED BELOW:
MOVIE NAME, MOVIE YEAR, RATING AND GENRE.
The Martian
2015
Adventure
8.0
Murder on the Orient Express
2017
Crime
6.5
X-Men: First Class
2011
Action
7.7
X-Men: Days of Future Past
2014
Action
7.9
This Means War
2012
Action
6.3
Godzilla vs. Kong
2021
Adventure
6.5
Black Widow
2021
Action
7.5
Zack Snyder's Justice League
2021
Action
8.1
The Ten Commandments
1956
Drama
7.9
The Father
2020
Drama
8.3
Nobody
2021
Crime
7.5
Promising Young Woman
2020
Crime
7.5
What Lies Below
2020
Horror
4.4
Shrine
2021
Horror
5.1
Bram Stoker's Dracula
1992
Horror
7.4
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 3 images