Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java Assume that a list of movies produced in different years are listed in a text file. Assume that the name of the text

In Java

image text in transcribedimage text in transcribed

Assume that a list of movies produced in different years are listed in a text file. Assume that the name of the text file is "movies.txt". For example, here is some set of movies. Please feel to add, change, edit the test data. Fargo, 1970 Wanda, 1970 Airport, 1970 Red Sun, 1971 Solaris, 1971 Fargo, 1990 Airport, 1981 Tenet, 2020 You will write a program To read this text file To construct a movie object with two fields (name and year_made) for each line read To construct a collection of movies (ArrayList, arra[ ], vector) To ask the user for inputting a movie name as well as the year in which it is made. To update the file with this movie only if (the movie and the year) does not exist in the file. For example, here is a sample output of the program if there is no such movie in the file (Test Case 1) Enter the movie: tenet Enter the year: 2020 Movie doesn't exist in the file. Movie is added to the "movies.txt" (Test Case 2) Enter the movie: fargo Enter the year: 1970 Error! This movie already exist in the movie

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

Question Who can establish a Keogh retirement plan?

Answered: 1 week ago