Class ReviewManager
java.lang.Object
Manager
ReviewManager
- All Implemented Interfaces:
Base,BaseManager
A ReviewManager class that extends Manager and implements BaseManager interface
A ReviewManager object that processes all
Review related information
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidMethod to add review for moviesdoublegetAvgRating(String movieId) Method to get average rating for a moviegetListByMovieID(String movieId) Method to get review list by movieIDgetListByUserID(String userId) Method to get review list by userIDgetMovieRatings(MovieEY movie) Method to get movie ratings from review objects based on movie rating IDvoidMethod to read review object from filevoidMethod to set the ManagersvoidMethod to set Master ListMethod to get top 5 movies based on ratingsvoidMethod to write review objects to text fileMethods inherited from class Manager
getCentralManager, setCentralManagerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Base
getCentralManager, setCentralManager
-
Constructor Details
-
ReviewManager
public ReviewManager()
-
-
Method Details
-
setManagers
public void setManagers()Method to set the Managers- Specified by:
setManagersin interfaceBase
-
setMasterLists
public void setMasterLists()Method to set Master List- Specified by:
setMasterListsin interfaceBaseManager
-
addReview
Method to add review for movies- Parameters:
userID- The userIDmovieID- The movieIDscale- The Scale(1-5)reviewString- The review for movie
-
getListByMovieID
Method to get review list by movieID- Parameters:
movieId- The movieID- Returns:
- The review objects
-
getListByUserID
Method to get review list by userID- Parameters:
userId- The userID- Returns:
- The review objects
-
getAvgRating
Method to get average rating for a movie- Parameters:
movieId- The movieID- Returns:
- The average rating
-
top5MoviesByViewerRatings
Method to get top 5 movies based on ratings- Returns:
- The list of top 5 movies
-
getMovieRatings
Method to get movie ratings from review objects based on movie rating ID- Parameters:
movie- The movie object- Returns:
- The movie reviews
-
primeViewerRatings
Method to read review object from file- Throws:
IOException- If there's read error
-
writeViewerRatings
Method to write review objects to text file- Throws:
IOException- If there's write error
-