Class BookingManager
java.lang.Object
Manager
BookingManager
- All Implemented Interfaces:
Base,BaseManager
A BookingManager object
A BookingManager object contains all the parameters and methods required
to communicate between entity and boundary of Booking Class
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor method to create an object of class BookingManager -
Method Summary
Modifier and TypeMethodDescriptionBookTicket(String userID, String movieID, String date, String time, String cineplexID, String screenID, ArrayList<String> seatIDs) Method to book a ticket and return a booking IDgetAllBookings(String userID) Method to return all the bookings made by a particular usergetBookingByID(String bookingID) Method to get the booking using booking IDgetListOfSeats(BookingEY booking) Method to get the list of seats bookedMethod to get top 5 movies based on salesvoidMethod to read the input data from the filesvoidMethod to set all the controller classes passed as attributes Method to set the ManagersvoidMethod to set all the master lists passed as attributes Method to set Master ListvoidMethod to write data back to the 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
-
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:
setManagersin interfaceBase
-
setMasterLists
public void setMasterLists()Method to set all the master lists passed as attributes Method to set Master List- Specified by:
setMasterListsin interfaceBaseManager
-
getBookingByID
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 IDmovieID- The movie IDdate- The Datetime- The timecineplexID- The cineplex IDscreenID- The screen IDseatIDs- The array list of all seat IDs- Returns:
- The booking ID
- Throws:
ParseException- If unable to create object
-
getAllBookings
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
Method to get top 5 movies based on sales- Returns:
- Top 5 movies
-
getListOfSeats
Method to get the list of seats booked- Parameters:
booking- The Booking made- Returns:
- List of seats booked
-
primeBookings
Method to read the input data from the files- Throws:
IOException- if there's read errorParseException- if unable to create object
-
writeBookings
Method to write data back to the files- Throws:
IOException- If there's write error
-