Class ScreenManager
java.lang.Object
Manager
ScreenManager
- All Implemented Interfaces:
Base,BaseManager
A ScreenManager class that extends Manager and implements BaseManager interface
A ScreenManager object used to process all
Screen related information
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintMethod to add screenconvIDX2screenID(int idx) Method to convert index to screenIDgetCineplexScreenByName(CineplexEY cineplex, String screenName) Method to get cineplex screen by namegetScreenByID(String screenID) Method to get screenIDgetScreenNameByID(String screenID) Method to get screen name by screenIDMethod to list all screensvoidMethod to read screen information from text filesearchScreen(String screenName) Method to search screenvoidMethod to set the ManagersvoidMethod to set Master ListvoidMethod to write screen information 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
-
ScreenManager
public ScreenManager()Constructor for screen manager
-
-
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
-
getScreenByID
Method to get screenID- Parameters:
screenID- The screenID- Returns:
- The screen object
-
getScreenNameByID
Method to get screen name by screenID- Parameters:
screenID- The screenID- Returns:
- The screen name
-
addScreen
public int addScreen(String cineplexName, String screenName, String screenClass, int numRows, int seatsPerRow) Method to add screen- Parameters:
cineplexName- The cineplex namescreenName- The screen namescreenClass- the screen classnumRows- The number of rowsseatsPerRow- The number of seats per row- Returns:
- numeric value(0:duplicate screen,1: add screen successful,-1: cineplexID not found)
-
listAllScreens
Method to list all screens- Returns:
- The list of screen name
-
convIDX2screenID
Method to convert index to screenID- Parameters:
idx- An index- Returns:
- screenID
-
searchScreen
Method to search screen- Parameters:
screenName- The screen name- Returns:
- The screen object
-
getCineplexScreenByName
Method to get cineplex screen by name- Parameters:
cineplex- The cineplex objectscreenName- The screen name- Returns:
- The ScreenEY object
-
primeScreen
Method to read screen information from text file- Throws:
IOException- If there's read error
-
writeScreen
Method to write screen information to text file- Throws:
IOException- If there's read error
-