Class BTOManagementApplication

Object
BTOManagementApplication

public class BTOManagementApplication extends Object
Main entry for our project's CLI application.
  • Field Details

  • Constructor Details

    • BTOManagementApplication

      public BTOManagementApplication()
  • Method Details

    • main

      public static void main(String[] args)
      Entry point for CLI application, read and write.
      Parameters:
      args -
    • prepareHeader

      private static String prepareHeader(String title)
      Use this to prepare a string that centers text and places hyphens left and right of it.
      Parameters:
      title - The title to be centered.
      Returns:
      string ready for display.
    • displayMenu

      private static void displayMenu()
      Displays the main menu of the application.
    • startResponseLoop

      private static void startResponseLoop()
      Once called, this method will always ask the user to do something, again and again, unless requested by the user to exit or logout.
    • handleUserResponse

      private static void handleUserResponse(String response)
      Handle what the user has inputed.
      Parameters:
      response - To be converted
    • handleAction

      private static void handleAction(int index) throws Exception
      Handles the option selected by user. Will pass this along to relevant action classes
      Parameters:
      index - The index provided by user.
      Throws:
      Exception
    • changePassword

      private static void changePassword()
    • changeListingSort

      private static void changeListingSort()
      Show change listing sort options and ask what user want
    • changeListingFilter

      private static void changeListingFilter()
      Show change filter options and ask what user want
    • getGreetings

      private static String getGreetings()
      Different greetings depending on time of day.
      Returns:
      the greetings.
    • login

      private static void login()
      User login flow.