Class BookingManager

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

public class BookingManager extends Manager implements BaseManager
A BookingManager object

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

  • Constructor Details

    • BookingManager

      public BookingManager()
      Constructor method to create an object of class BookingManager
  • Method Details

    • setManagers

      public void setManagers()
      Method to set all the controller classes passed as attributes Method to set the Managers
      Specified by:
      setManagers in interface Base
    • setMasterLists

      public void setMasterLists()
      Method to set all the master lists passed as attributes Method to set Master List
      Specified by:
      setMasterLists in interface BaseManager
    • getBookingByID

      public BookingEY getBookingByID(String bookingID)
      Method to get the booking using booking ID
      Parameters:
      bookingID - The booking ID
      Returns:
      The BookingEY object
    • BookTicket

      public String BookTicket(String userID, String movieID, String date, String time, String cineplexID, String screenID, ArrayList<String> seatIDs) throws ParseException
      Method to book a ticket and return a booking ID
      Parameters:
      userID - The user ID
      movieID - The movie ID
      date - The Date
      time - The time
      cineplexID - The cineplex ID
      screenID - The screen ID
      seatIDs - The array list of all seat IDs
      Returns:
      The booking ID
      Throws:
      ParseException - If unable to create object
    • getAllBookings

      public ArrayList<String> getAllBookings(String userID)
      Method to return all the bookings made by a particular user
      Parameters:
      userID - The user ID
      Returns:
      The bookings made from the user ID given
    • getTop5Movies

      public ArrayList<String> getTop5Movies()
      Method to get top 5 movies based on sales
      Returns:
      Top 5 movies
    • getListOfSeats

      public ArrayList<String> getListOfSeats(BookingEY booking)
      Method to get the list of seats booked
      Parameters:
      booking - The Booking made
      Returns:
      List of seats booked
    • primeBookings

      public void primeBookings() throws IOException, ParseException
      Method to read the input data from the files
      Throws:
      IOException - if there's read error
      ParseException - if unable to create object
    • writeBookings

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