Class UserManager

Object
UserManager

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

    • UserManager

      public UserManager()
      Constructor
  • Method Details

    • login

      public static Object login(String username, String password)
      Method to perform simple login by verifying the user's username and password entered according to the database
      Parameters:
      username - is the username of the user
      password - is the password of the user
      Returns:
      An CinemaStaff or MovieGoer Object based on which database the details was verified from
    • checkUniqueUser

      public static boolean checkUniqueUser(String username)
      Method to check database if the entered username is unique
      Parameters:
      username - is the username entered by movie goer
      Returns:
      A boolean flag whether the username is unique or not
    • register

      public static MovieGoer register(MovieGoerAge age, String name, String username, String password, String email, String mobileNum)
      Method to register for a new movie goer account by creating a MovieGoer object
      Parameters:
      age - is the MovieGoerAge of the movie goer
      name - is the name of the movie goer
      username - is the username of the movie goer's account
      password - is the password of the movie goer's account
      email - is the email of the movie goer
      mobileNum - is the password of the movie goer
      Returns:
      The created {MovieGoer} object