Class CineplexManager
java.lang.Object
Manager
CineplexManager
- All Implemented Interfaces:
Base,BaseManager
A CineplexManager object
A CineplexManager object contains all the parameters and methods required
to communicate between entity and boundary of Cineplex Class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddCineplex(String cinemaName, String location) Method to add a new cineplexconvertIDX2CineplexID(int idx) Method to return convert idx to cineplex IDgetCineplexByID(String cineplexID) Method to return cineplex by cineplexIDgetCineplexByName(String cineplexName) Method to search for cineplex by nameMethod to display all cineplexesvoidMethod to read from the input datasearchCineplexByName(String name) Method to search for cineplex by namevoidMethod to set controller class Method to set the ManagersvoidMethod to set Master lists Method to set Master ListvoidMethod to write back to the data filesMethods 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
-
CineplexManager
public CineplexManager()Default Constructor
-
-
Method Details
-
setManagers
public void setManagers()Method to set controller class Method to set the Managers- Specified by:
setManagersin interfaceBase
-
setMasterLists
public void setMasterLists()Method to set Master lists Method to set Master List- Specified by:
setMasterListsin interfaceBaseManager
-
getCineplexByID
Method to return cineplex by cineplexID- Parameters:
cineplexID- The cineplex ID- Returns:
- Cineplex
-
addCineplex
Method to add a new cineplex- Parameters:
cinemaName- The name of the cineplexlocation- The location of the cineplex- Returns:
- True if a cineplex is created, false if the cineplex already exists
-
searchCineplexByName
Method to search for cineplex by name- Parameters:
name- The cineplex name- Returns:
- cineplex object which matches the provided name, else returns null
-
convertIDX2CineplexID
Method to return convert idx to cineplex ID- Parameters:
idx- Unique ID- Returns:
- The cineplex ID
-
listAllCineplexes
Method to display all cineplexes- Returns:
- list of all the cineplexes
-
getCineplexByName
Method to search for cineplex by name- Parameters:
cineplexName- The cineplex name- Returns:
- cineplex object which matches the provided name, else returns null
-
primeCineplex
Method to read from the input data- Throws:
IOException- If there's read error
-
writeCineplex
Method to write back to the data files- Throws:
IOException- If there's write error
-