Class CinemaStaffManager

Object
CinemaStaffManager

public class CinemaStaffManager extends Object
Controller class for handling all logic related to CinemaStaff
Version:
1.0
Author:
Jonathan Ng
  • Constructor Details

    • CinemaStaffManager

      public CinemaStaffManager()
      Constructor
  • Method Details

    • createCinemaStaff

      public static CinemaStaff createCinemaStaff(String name, String password, String username)
      Method to create cinema staff instance and save it to database
      Parameters:
      name - is the name of the cinema staff
      password - is the password of the cinema staff's account used during login
      username - is the username of the cinema staff's account used during login
      Returns:
      The created CinemaStaff object
    • movieAdder

      public static void movieAdder(String title, MovieAgeRating movieAgeRating, MovieShowingStatus movieShowingStatus, ArrayList<String> movieCast, String director, String synopsis, double duration, int movieTypeChoice, ArrayList<String> showingVenue, ArrayList<ArrayList<Seat>> seatingPlan, ArrayList<DateTime> showingTime)
      Method to add a new Movie into the database and schedule it into the movie scheduler MovieSchedule
      Parameters:
      title - is the title of the new movie
      movieAgeRating - is the age rating of the new movie
      movieShowingStatus - is the new showing status of the new movie
      movieCast - is all the cast members of the new movie
      director - is the name of the director of the new movie
      synopsis - is the synopsis of the new movie
      duration - is the length of the new movie
      movieTypeChoice - is the choice of the new movie type
      showingVenue - is all the showing venues of the new movie
      seatingPlan - is all the seating plan of the cinema corresponding to the cinema type
      showingTime - is all the showing times of the movie
    • updateExistingMovieDetails

      public static void updateExistingMovieDetails(Movie movie, int detail)
      Method to update the details for existing movies in the database
      Parameters:
      movie - is the movie in consideration
      detail - is the particular detail that is to be updated. Cinema staffs are able to configure 1. Movie Title 2. Movie Type 3. Age Rating 4. Showing Status 5. Name of movie casts 6. Name of movie director 7. Synopsis 8. Duration of movie 9. Movie Schedule (Showing venue and Showing time)
    • configurePrice

      public static void configurePrice(int choice)
      Method for cinema staffs to configure the Prices for various flat prices and rates and updates the database
      Parameters:
      choice - is the choice of which price to configure
    • configureHoliday

      public static int configureHoliday(int choice)
      Method for cinema staffs to configure the ArrayList of holidays in the database
      Parameters:
      choice - is the choice of whether to add a new holiday or to remove an existing holiday
      Returns:
      Integer flag whether the configuration is successful or not
    • printHolidayList

      public static void printHolidayList(String content)
      Method to print out the holidays on the holidays ArrayList
      Parameters:
      content - is the contents to be printed out
    • queryDate

      public static DateTime queryDate()
      Method to query and create a new date
      Returns:
      DateTime object of the queried date
    • queryHoliday

      public static DateTime queryHoliday()
      Method to query and create a new holiday
      Returns:
      DateTime object of the queried date
    • optInOut

      public static void optInOut(int choice, boolean optInOut)
      Method to opt in/out the permissions of movie goers from viewing the list of top five
      Parameters:
      choice - is the choice whether to opt in/out based on overall ratings or based on movie sales
      optInOut - is the choice whether to opt in or opt out