Package src.controller
Class MovieTicketManager
Object
MovieTicketManager
Controller for handling all logic related to
MovieTicket
- Version:
- 1.0
- Author:
- Ci Hui
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MovieTicket
createMovieTicket
(String movieUUID, DateTime showTime, String cinemaUUID, String seatID) Method to create aMovieTicket
instance 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 ofMovieTicket
from 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 aMovieTicket
instance 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
MovieTicket
instance
-
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 ofMovieTicket
from 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 theMovie
chosen by the Movie GoershowTime
- is theDateTime
of the Showing Time of the Movie chosen by the Movie Goercinema
- is theCinema
chosen 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
MovieTicket
instance
-