Class CineplexManager

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

public class CineplexManager extends Manager implements BaseManager
A CineplexManager object

A CineplexManager object contains all the parameters and methods required to communicate between entity and boundary of Cineplex Class

  • Constructor Details

    • CineplexManager

      public CineplexManager()
      Default Constructor
  • Method Details

    • setManagers

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

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

      public CineplexEY getCineplexByID(String cineplexID)
      Method to return cineplex by cineplexID
      Parameters:
      cineplexID - The cineplex ID
      Returns:
      Cineplex
    • addCineplex

      public Boolean addCineplex(String cinemaName, String location)
      Method to add a new cineplex
      Parameters:
      cinemaName - The name of the cineplex
      location - The location of the cineplex
      Returns:
      True if a cineplex is created, false if the cineplex already exists
    • searchCineplexByName

      public CineplexEY searchCineplexByName(String name)
      Method to search for cineplex by name
      Parameters:
      name - The cineplex name
      Returns:
      cineplex object which matches the provided name, else returns null
    • convertIDX2CineplexID

      public String convertIDX2CineplexID(int idx)
      Method to return convert idx to cineplex ID
      Parameters:
      idx - Unique ID
      Returns:
      The cineplex ID
    • listAllCineplexes

      public ArrayList<String> listAllCineplexes()
      Method to display all cineplexes
      Returns:
      list of all the cineplexes
    • getCineplexByName

      public CineplexEY getCineplexByName(String cineplexName)
      Method to search for cineplex by name
      Parameters:
      cineplexName - The cineplex name
      Returns:
      cineplex object which matches the provided name, else returns null
    • primeCineplex

      public void primeCineplex() throws IOException
      Method to read from the input data
      Throws:
      IOException - If there's read error
    • writeCineplex

      public void writeCineplex() throws IOException
      Method to write back to the data files
      Throws:
      IOException - If there's write error