Class CineplexManager

Object
CineplexManager

public class CineplexManager extends Object
Controller class for Cineplex which handles all logic related to Cineplex
Version:
1.0
Author:
Lee Juin
  • Constructor Details

    • CineplexManager

      public CineplexManager()
      Constructor
  • Method Details

    • createCineplex

      public static Cineplex createCineplex(String cineplexName, int numOfCinemas, ArrayList<Cinema> cinemas, String cineplexLocation)
      Method to create a cineplex and save to database
      Parameters:
      cineplexName - is the name of the cineplex
      numOfCinemas - is the number of cinemas in the cineplex
      cinemas - is all the Cinema instances in the cineplex
      cineplexLocation - is the location of the cineplex
      Returns:
      The Cineplex created
    • getCineplexByCinema

      public static Cineplex getCineplexByCinema(Cinema targetCinema)
      Method to retrieve a cineplex by the query cinema
      Parameters:
      targetCinema - is the cinema to query cineplex for
      Returns:
      The Cineplex instance containing the target cinema
    • filterCineplexesByMovie

      public static ArrayList<Cineplex> filterCineplexesByMovie(Movie movie)
      Method to filter a list of cineplexes by the movie showing
      Parameters:
      movie - is the movie showing to query cineplex for
      Returns:
      ArrayList of Cineplex instances which are showing the queried movie
    • filterCineplexesByMovieSchedule

      public static ArrayList<Cineplex> filterCineplexesByMovieSchedule(MovieSchedule movieSchedule)
      Method to filter cineplexes by queried movie schedule
      Parameters:
      movieSchedule - is the movie schedule to query the cineplex for
      Returns:
      ArrayList of filtered Cineplex instances which have cinemas contained in the queried movie schedule