Answered step by step
Verified Expert Solution
Question
1 Approved Answer
in JAVA, use hash set and List readCSV and show your output: IMDB Movie Database Red - Black Binary Search Trees and Hashing The assignment
in JAVA, use hash set and List readCSV and show your output:
IMDB Movie Database RedBlack Binary Search Trees and Hashing
The assignment is about design and development of a movie database for IMDB movie data. You are given a csv file which stores the following information for each movie. There are around movies listed in the file.
id
Color
movietitle
duration
directorname
actorname
actorname
actorname
movieimdblink
language
country
contentrating
year
imdbscore
Functional and Design Requirements
Your program
creates a movie database by reading the data from csv file into an array
creates a hash table of red black trees to perform search operation by fields including year, imdbscore, language and contentrating. red black tree where key is year; another red black tree where key is imdbscore, etc.
stores red black trees in a hash table
performs search operation by year, imdbscore, by contentrating andor language using the indexing trees
prompts the user to enter search criteria for ignore
Prints the information of all the movies that are in the result set
Starter Code
You've been provided with a partially implemented Client class. The sample output shown above is the result of running this Client class. While you can't alter the main method implementation, you're welcome to add additional classes and methods as necessary.
public class Client
public static void mainString args throws FileNotFoundException
MoviesDB db new MoviesDBmoviescsv;
Set result dbsearchByYear;
Set result dbsearchByIMDBScore;
Set result intersectionresult result;
if result null
Systemout.printlnFound result.size movies";
Systemout.printlnresult;
Iterator idIterator result.iterator;
while idIteratorhasNext
int id idIterator.next;
Systemout.printlndbgetid;
simplecsv
Sample Run: The sample run was tested using the simple.csv file, not the original dataset. Please also note that the text
highlighted in green below represents user inputs.
Year:
Score:
Language:
Rating:
Results Movies year: score:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started