Class TicketPriceManager
java.lang.Object
Manager
TicketPriceManager
- All Implemented Interfaces:
Base,BaseManager
A Ticket Price Manager Object
A TicketPriceManager object used
process all ticket price information
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncharaddTicketPrice(String dateType, String screenClass, String movieGoerAge, String movieType, double price) Method to add ticket pricedoublegetTicketPrice(String dayType, String screenClass, String movieGoerAge, String movieType) Method to get ticket priceMethod to return a list of all ticket pricesvoidMethod to read ticket prices from text filevoidMethod to set the ManagersvoidMethod to set Master ListvoidMethod to write ticket price 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
-
TicketPriceManager
public TicketPriceManager()TicketPriceManager object constructor
-
-
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
-
addTicketPrice
public char addTicketPrice(String dateType, String screenClass, String movieGoerAge, String movieType, double price) Method to add ticket price- Parameters:
dateType- The dateType (HOLIDAY or WEEKEND)screenClass- The type of screen class (PLATINUM_MOVIE_SUITES or REGULAR_SCREEN)movieGoerAge- The movie goer agemovieType- The movie type (Blockbuster/3D/Documentary)price- The price of the ticket- Returns:
- character U if successfully updated or I if has to be created and then updated
-
getTicketPrice
public double getTicketPrice(String dayType, String screenClass, String movieGoerAge, String movieType) Method to get ticket price- Parameters:
dayType- The dateType (HOLIDAY or WEEKEND)screenClass- The type of screen class (PLATINUM_MOVIE_SUITES or REGULAR_SCREEN)movieGoerAge- The movie goer agemovieType- The movie type (Blockbuster/3D/Documentary)- Returns:
- The ticket price
-
listAllTicketPrices
Method to return a list of all ticket prices- Returns:
- An arrayList of ticket prices if exist
-
primeTicketPrice
Method to read ticket prices from text file- Throws:
IOException- if there's IO error
-
writeTicketPrice
Method to write ticket price to text file- Throws:
IOException- if there's IO error
-