Class MainMenuUI

java.lang.Object
com.ntu.fdae.group1.bto.views.BaseUI
com.ntu.fdae.group1.bto.views.MainMenuUI

public class MainMenuUI extends BaseUI
MainMenuUI class for handling the main menu of the BTO Management System.

This class is responsible for displaying the main menu options to the user. It provides options for logging in or exiting the application. The main menu serves as the entry point to the system.

The class extends BaseUI to leverage common UI components and input handling methods, providing a consistent user experience.

  • Constructor Details

    • MainMenuUI

      public MainMenuUI(AuthenticationController authController, Scanner scanner)
      Constructs a new MainMenuUI with the specified authentication controller and scanner.
      Parameters:
      authController - The controller for handling authentication operations
      scanner - The scanner for reading user input
      Throws:
      IllegalArgumentException - if authController is null
  • Method Details

    • displayMainMenu

      public User displayMainMenu()
      Displays the main menu and handles user input.
      Returns:
      The authenticated User object if login is successful, or null if the user chooses to exit.