Question: how can I make this method work without changing the variables import java.util.Scanner; public class ParallelArrayMovies { public static final String DATAFILE = .
how can I make this method work without changing the variables
import java.util.Scanner;
public class ParallelArrayMovies
public static final String DATAFILEdatamovielisttxt;
public static final int MAXMOVIES;
public static void mainString args
int choice; user's selection from the menu
String titles new StringMAXMOVIES;
String genres new StringMAXMOVIES;
int years new intMAXMOVIES;
int numberOfEntries;
titlesDrNo;
genresRmomance;
years;
titlesFrom Russia with Love";
genresAction;
years;
titlesAgent Pasport to Hell";
genresHorror;
years;
numberOfEntries loadMoviestitlesgenres,years;
numberOfEntries;
System.out.printlnNumber of entries read from data file: numberOfEntries;
do
choice getMenuChoice;
if choice
numberOfEntries enterMovietitlesgenres,years,numberOfEntries;
else if choice
DeleteaMovietitlesgenres,years,numberOfEntries;
else if choice
displayAlltitlesgenres,years,numberOfEntries;
else if choice
searchbyTitletitlesgenres,years,numberOfEntries;
else if choice
searchByGenretitlesgenres,years,numberOfEntries;
else if choice
searchByYeartitlesgenres,years,numberOfEntries;
while choice;
System.out.println
THE END";
Allow user to enter a new movie.
@param titles array of movie titles
@param genres array of movie genres
@param years array of movie copyright dates
@param n the actual number of movies currently in the array
@return the new movie count
public static int enterMovieString titles, String genres, int years, int n
Scanner kb new ScannerSystemin;
System.out.printEnter movie title : ;
titlesn kbnextLine;
System.out.printEnter movie genre: ;
genresn kbnextLine;
System.out.printEnter year of movie: ;
yearsn kbnextInt;
kbnextLine;
return n;
public static int loadMoviesString titles, String genres, int years
return ;
public static void displayAllString titles, String genres, int years, int n
int i;
System.out.println;
System.out.printfs s s
"TITLE","GENRE","YEAR";
for i; i
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
