Package src.controller
Class MovieTicketManager
Object
MovieTicketManager
Controller for handling all logic related to
MovieTicket- Version:
- 1.0
- Author:
- Ci Hui
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MovieTicketcreateMovieTicket(String movieUUID, DateTime showTime, String cinemaUUID, String seatID) Method to create aMovieTicketinstance and save to databasestatic ArrayList<MovieTicket>createMovieTicketList(ArrayList<String> seatID, Movie movieToWatch, DateTime showTime, Cinema cinema, ArrayList<Seat> seatingPlan, double totalMovieTicketPrice) Method to create an Array List ofMovieTicketfrom the Array List of seat ID booked by the Movie Goer
-
Constructor Details
-
MovieTicketManager
public MovieTicketManager()Constructor
-
-
Method Details
-
createMovieTicket
public static MovieTicket createMovieTicket(String movieUUID, DateTime showTime, String cinemaUUID, String seatID) Method to create aMovieTicketinstance and save to database- Parameters:
movieUUID- is the unique ID of the chosen MovieshowTime- is the Showing Time of the chosen MoviecinemaUUID- is the unique ID of the chosen CinemaseatID- is the front-end displayed seat ID of the chosen Seat- Returns:
- the created
MovieTicketinstance
-
createMovieTicketList
public static ArrayList<MovieTicket> createMovieTicketList(ArrayList<String> seatID, Movie movieToWatch, DateTime showTime, Cinema cinema, ArrayList<Seat> seatingPlan, double totalMovieTicketPrice) Method to create an Array List ofMovieTicketfrom the Array List of seat ID booked by the Movie Goer- Parameters:
seatID- is the Array List of front-end displayed Seat ID booked by the Movie GoermovieToWatch- is theMoviechosen by the Movie GoershowTime- is theDateTimeof the Showing Time of the Movie chosen by the Movie Goercinema- is theCinemachosen by the Movie GoerseatingPlan- is the seating plan of the chosen CinematotalMovieTicketPrice- is the Total Price of the Movie Tickets booked by the Movie Goer- Returns:
- the created Array List of
MovieTicketinstance
-