Class UserFactory

java.lang.Object
app.entity.user.UserFactory

public class UserFactory extends Object
The UserFactory class provides a factory method for creating user objects based on the specified user type.
  • Constructor Details

    • UserFactory

      public UserFactory()
  • Method Details

    • getUser

      public static User getUser(String userType, String ID, String name, String faculty)
      Creates and returns a user object based on the specified user type.
      Parameters:
      userType - The type of the user (e.g., "student" or "staff").
      ID - The ID of the user.
      name - The name of the user.
      faculty - The faculty of the user.
      Returns:
      A user object of the specified type, or null if the user type is unknown.