Class TicketPriceManager

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

public class TicketPriceManager extends Manager implements BaseManager
A Ticket Price Manager Object

A TicketPriceManager object used process all ticket price information

  • Constructor Details

    • TicketPriceManager

      public TicketPriceManager()
      TicketPriceManager object constructor
  • Method Details

    • setManagers

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

      public void setMasterLists()
      Method to set Master List
      Specified by:
      setMasterLists in interface BaseManager
    • 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 age
      movieType - 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 age
      movieType - The movie type (Blockbuster/3D/Documentary)
      Returns:
      The ticket price
    • listAllTicketPrices

      public ArrayList<String> listAllTicketPrices()
      Method to return a list of all ticket prices
      Returns:
      An arrayList of ticket prices if exist
    • primeTicketPrice

      public void primeTicketPrice() throws IOException
      Method to read ticket prices from text file
      Throws:
      IOException - if there's IO error
    • writeTicketPrice

      public void writeTicketPrice() throws IOException
      Method to write ticket price to text file
      Throws:
      IOException - if there's IO error