Package controller

Interface IUserController

All Known Implementing Classes:
UserController

public interface IUserController
Handles communication between Model's User-class and the GUI
  • Method Summary

    Modifier and Type
    Method
    Description
    returns the username of the logged-in user
    boolean
    returns true if the user is logged in
    boolean
    login(String username, String password)
    returns the score for the next wrong guess
    void
    logs out the user if logged in
    boolean
    register(String username, String password)
    registers a new user
  • Method Details

    • login

      boolean login(String username, String password)
      returns the score for the next wrong guess
      Parameters:
      username - the username of the user
      password - the password of the user
      Returns:
      true if the user was successfully logged in
    • register

      boolean register(String username, String password)
      registers a new user
      Parameters:
      username - the username of the new user
      password - the password of the new user
      Returns:
      true if the user was successfully registered
    • logout

      void logout()
      logs out the user if logged in
    • isLoggedIn

      boolean isLoggedIn()
      returns true if the user is logged in
      Returns:
      true if the user is logged in
    • getUsername

      String getUsername()
      returns the username of the logged-in user
      Returns:
      the username of the logged-in user