not allowed to use algorithm constraints/<array lists>
In this program, you will build a Netflix movie database usingthe provided file, netflix.csv. The file contains more than twohundred records of movies and TV programs, with each recordconsisting a title, a rating, a release year, and a user ratedscore.
There are three classes that you will need to implement: Movie,NetflixHandler, and NetflixApp.
– title: String
– rating: String
– year: int
– score: int
+ Movie (String title, String rating, int year, int score)
+ getTitle(): String
+ getRating(): String
+ getYear(): int
+ getScore(): int
+ toString(): String
- title: Title of a movie or TV program.
- rating: Rating of a movie or TV program. E.x.: R or PG-13
- year: Year of release.
- score: User rated score.
- Movie (String title, String rating, int year, int score): Anoverloaded constructor.
- Getters for all the instance variables.
- toString(): It returns a string of information: title yearrating score
– data: Movie
– actualSize: int
+ SIZE: int = 500
+ NetflixHandler ()
+ read (String filePath): void
+ displayAllMovies (): void
+ searchTitle (): void
+ searchYear (): void
+ sort (Movie movies, int size): void
+ makeRecommendations(): void
Instance variables and constants:
- data: It is an array of Movie objects.
- actualSize: It is the real number of Movie objects in apartially filled array.
- SIZE: A constant that is set to be 500.
- NetflixHandler (): The default constructor that initializes theinstance variable, data, to a Movie array that has a size of500.
- read (): This method opens the given file, netflix.csv, andreads it. While reading the file line by line, it also creates aMovie object and saves it into data.
- displayAllMovies (): This method loops through all the Movieobjects saved in data and display their information.
- searchTitle (): This method looks for a movie that matches thetitle provided by a user.
- searchYear (): This method looks for a group of movies thatmatch the release year given by a user.
- sort (Movie movies, int size): This method sorts a givenMovie array, movies, using the provided size. It sorts the arrayinto a descending order based on the user rated score.
- makeRecommendations (): This method makes recommendations to auser based on two options. Option one: It finds thetop-5 movies, based on the user rated score, undera certain rating. The method then writes those 5 movies into afile, “top_5_movies.txt”. Option two: It finds thetop-20 movies, based on the score only. The methodthen writes those 20 movies in to a file, “top_20_movies.txt”.
This is the main class. It has a private andstatic method, menu, which displays a menu that containsseveral choices (Please see the expected outcomes file for moredetails.). The main method should create a NetflixHandler objectand let it call the read method before taking any choices.
Welcome to the Netflix Database
1. Browse all movies.
2. Search a movie based ontitle.
3. Search movies based onyear.
4. Top moviesrecommendation.
Please make your choice: 8
Please provide a valid input: 9
Please provide a valid input: 1
Title Year Rating Score
WhiteChicks 2004 PG-13 82
Grey’sAnatomy 2016 TV-14 98
Prison Break 2008 TV-14 98
How I Met YourMother 2014 TV-PG 94
Supernatural 2016 TV-14 95
BreakingBad 2013 TV-MA 97
|title||rating||release year||user rating score|
|How I Met Your Mother||TV-PG||2014||94|
|The Vampire Diaries||TV-14||2017||91|
|The Walking Dead||TV-MA||2015||98|
|Pretty Little Liars||TV-14||2016||96|
|Once Upon a Time||TV-PG||2016||98|
|Masha and the Bear||TV-Y||2013||81|
Answer to Using JAVA not allowed to use algorithm constraints/ Netflix Database In this program, you will build a Netflix movie da…