Class ReviewManager

java.lang.Object
Manager
ReviewManager
All Implemented Interfaces:
Base, BaseManager

public class ReviewManager extends Manager implements BaseManager
A ReviewManager class that extends Manager and implements BaseManager interface

A ReviewManager object that processes all Review related information

  • Constructor Details

    • ReviewManager

      public ReviewManager()
  • Method Details

    • setManagers

      public void setManagers()
      Method to set the Managers
      Specified by:
      setManagers in interface Base
    • setMasterLists

      public void setMasterLists()
      Method to set Master List
      Specified by:
      setMasterLists in interface BaseManager
    • addReview

      public void addReview(String userID, String movieID, double scale, String reviewString)
      Method to add review for movies
      Parameters:
      userID - The userID
      movieID - The movieID
      scale - The Scale(1-5)
      reviewString - The review for movie
    • getListByMovieID

      public ArrayList<ReviewEY> getListByMovieID(String movieId)
      Method to get review list by movieID
      Parameters:
      movieId - The movieID
      Returns:
      The review objects
    • getListByUserID

      public ArrayList<ReviewEY> getListByUserID(String userId)
      Method to get review list by userID
      Parameters:
      userId - The userID
      Returns:
      The review objects
    • getAvgRating

      public double getAvgRating(String movieId)
      Method to get average rating for a movie
      Parameters:
      movieId - The movieID
      Returns:
      The average rating
    • top5MoviesByViewerRatings

      public ArrayList<String> top5MoviesByViewerRatings()
      Method to get top 5 movies based on ratings
      Returns:
      The list of top 5 movies
    • getMovieRatings

      public ArrayList<ReviewEY> getMovieRatings(MovieEY movie)
      Method to get movie ratings from review objects based on movie rating ID
      Parameters:
      movie - The movie object
      Returns:
      The movie reviews
    • primeViewerRatings

      public void primeViewerRatings() throws IOException
      Method to read review object from file
      Throws:
      IOException - If there's read error
    • writeViewerRatings

      public void writeViewerRatings() throws IOException
      Method to write review objects to text file
      Throws:
      IOException - If there's write error