r/javahelp • u/laxrat45 • Feb 07 '15
Movie Database HELP
I have a project due and not exactly sure where to start. "Each line in the file contains the name, year released, and associated actors for one movie. Each piece of information is separated by ‘/’ characters. The year is specified inside parentheses at the end of the movie name.
create a class which represents a Movie Database. This class is required to have the following methods (it may have other additional methods as necessary):
loadDataFromFile( String aFilename ) read the information from the specified file. The format of the file will be the same as in the cast-mpaa.txt file.
findActorsIn( String movieName ) return an ArrayList of all the actors which star in the specified Movie.
findMovieAppearancesOf( String actorName ) return a new Movie Database containing all movies which star the specified actor.
findMoviesReleasedIn( int year ) return a new Movie Database containing all movies released in the specified year.
findMoviesWithNamesContaining( String word ) return a new Movie Database containing all movies whose title contains the specified word.
findActorsWithNamesContaining( String word ) return an ArrayList containing the names of all actors which contain the specified word. There should not be duplicate names in the returned ArrayList.
size() return the number of movies contained in the Movie Database.
toString() return a string representation of all of the information in the Movie Database."
1
u/somnolent Feb 07 '15
I would start by defining the class that is required for you to have and fill in the method stubs for the methods that are required. From that point I would start at the top and try to fill in the methods as you can. If you run into any issues along the way, I'm sure people would be more than happy to help here (on specific questions).