Public feed
#893451
For this question, you will write the JMDB (Java Movie Database), which will store information about movies and the actors that have starred in them. Your program will require two classes, Actor and Movie.The Actor class contains the following information: * lastName (String) - the actor's last name * firstName (String) - the actor's first name * birthYear (int) - the year the actor was born The Movie class contains the following information: * title (String) - the title of the movie * year (int) - the year the movie was released * star (Actor) - a reference to the actor who starred in the movie (could be null if the movie has no star) Your program will require an array of Actor objects, and another array of Movie objects. Note that the two arrays are not parallel: they may be of different lengths, and there is not a one-to-one relationship between movies and actors.To get the initial data into your program, you will use a provided class called JMDBSource.class. Download this file and place it into the same folder as your program. Its purpose is to fill parallel arrays with actor and movie information; your program will translate these parallel arrays into an array of actor objects and an array of movie objects.There are four static methods in JMDBSource that you need to use: * int getNumActors() — return the number of actors * void fillActorArrays(String[] lastNames, String[] firstNames, int[] birthYears) — fill parallel arrays with actor information (their size must be equal to the value returned by getNumActors). * int getNumMovies() — return the number of movies * void fillMovieArrays(String[] titles, int[] years, String[] starFirst, String[] starLast) — fill parallel arrays with movie information (their size must be equal to the value returned by getNumMovies). In the parallel arrays returned from from fillMovieArrays, you will either get the names of actors that are found in the list of actors, or null if the movie has no star. For non-null values, search for the name in your list of Actor objects to find the star.Once your program has created the arrays of Actor and Movie objects, it should produce the following output: * A list of all the movies. If a movie has a star, print the name of the star after the name of the movie, followed by the age of the actor when the movie was made (age is year of movie - year of actor's birth). * The total count of movies without stars (the star is null). * A list of all the actors names and the number of movies that actor starred in (according to the list in our database). The output should be generated from your arrays, not hard-coded into your program! The following is the first few lines of output from the given data:Movies and their stars:The Shining (1980) Starring: Jack Nicholson (1937) (age 43)Sicko (2007) (no stars)Hand in both your Java source code and the output produced when your program is run.When you write your Actor and Movie classes, try to avoid writing getter/setter methods; instead, write methods that actually reflect the operations you are performing on the objects.