Skip to content

Commit cc27b55

Browse files
committed
Week2. getMovieSize()
1 parent f03a2de commit cc27b55

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

Week2/src/SecondRatings.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,14 @@ public SecondRatings(String moviesFileName, String ratingsFileName) {
2424
myMovies = firstRatings.getMovieArrayList();
2525
myRaters = firstRatings.getRaterArrayList();
2626
}
27+
28+
/**
29+
* A public method which returns the number of movies that were read in and stored in the
30+
* ArrayList of type Movie
31+
*
32+
* @return int number of movies
33+
*/
34+
public int getMovieSize() {
35+
return this.myMovies.size();
36+
}
2737
}

0 commit comments

Comments
 (0)