Answered step by step
Verified Expert Solution
Link Copied!

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 Red-Black 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 5000 movies listed in the file.
id
Color
movie_title
duration
director_name
actor_1_name
actor_2_name
actor_3_name
movie_imdb_link
language
country
content_rating
year
imdb_score
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, imdb_score, language and content_rating. [red black tree where key is year; another red black tree where key is imdb_score, etc.]
- stores red black trees in a hash table
- performs search operation by year, imdb_score, by content_rating and/or 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 main(String[] args) throws FileNotFoundException {
MoviesDB db = new MoviesDB("movies.csv");
Set result1= db.searchByYear(2012);
Set result2= db.searchByIMDBScore(6.1);
Set result = intersection(result1, result2);
if (result != null){
System.out.println("Found "+ result.size()+" movies");
System.out.println(result);
Iterator idIterator = result.iterator();
while (idIterator.hasNext()){
int id = idIterator.next();
System.out.println(db.get(id));
}
}
}
},
//simple.csv
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: 2012
Score: 6.1
Language:-
Rating:-
Results (Movies -> year:2012 score:6.1)
5,10
image text in transcribed

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

Recommended Textbook for

More Books

Students also viewed these Databases questions