Question: please tell me what's wrong with the getMovieL istAsArray method, which I used getOnlyItems method inside it , and the isEmpty method. 89 / This



please tell me what's wrong with the getMovieL istAsArray method, which I used getOnlyItems method inside it, and the isEmpty method.
89 / This method returns an array of all of the Movie objects that are 90 stored in the movielist. The array returned does not contain any NULL is if the movielist empty 91values. This method re 92 This method may call the getonlyItems method 93 */ 91 values. This method returns an array of length 94 public Movie[] getMovielistAsArray0 /I TODO: Implement this method. 95 96 97 98 movieList getonl y Items (movieList, numMovies); = 100 101 102 103y 104 105 * Returns the number of Movies stored in the movieList. 106 / 107 public int getNumMovies()f 108 // TODO: Implement this method. 109 110 return movieList return numMovies; 112 / Returns true if the movieList contains no Movies, false otherwise. 113 R MovieListTest java Compile Messages IGRASP Messages Run /O Interactions MovieList java aLibraryMainjava Movie.java End MovieListTest, getMovieListAsArrayAfterExpansionTest21 java.lang.ArrayIndexOutOfBoundsException: 2
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
