Class Speech

java.lang.Object
amadeus.personality.Speech

public class Speech extends Object
Handles the user interface (UI) and speech interactions for the Amadeus application.

This class provides methods to display messages, commands, and task lists to the user, with features like typing effects and formatted text for better readability. It also includes visual elements such as dividers and ASCII art for an enhanced user experience.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Displays the list of available commands to the user.
    static void
    Displays the farewell message when the Amadeus application is exiting.
    static void
    Prints a visual divider line to the console.
    static void
    sayList(ArrayList<Task> taskList)
    Displays the current list of tasks to the user, organized by type (Deadlines, Events, ToDos).
    static void
    saySlowly(String text, int duration)
    Prints text to the console with a typing effect, simulating a character-by-character display.
    static void
    sayTaskAdded(Task task, String taskType)
    Notifies the user that a task has been successfully added to the list.
    static void
    sayTaskDeleted(int index)
    Notifies the user that a task has been successfully deleted from the list.
    static void
    sayTaskMarked(int index, boolean status)
    Notifies the user that a task has been marked as complete or incomplete.
    static void
    Notifies the user that all tasks have been reset and the task list is now empty.
    static void
    Displays the welcome message when the Amadeus application starts.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Speech

      public Speech()
  • Method Details

    • sayLine

      public static void sayLine()
      Prints a visual divider line to the console. This is used to separate sections of the output for better readability.
    • saySlowly

      public static void saySlowly(String text, int duration)
      Prints text to the console with a typing effect, simulating a character-by-character display. This method is useful for creating a more interactive and engaging user experience.
      Parameters:
      text - the text to be printed to the console; must not be null.
      duration - the delay (in milliseconds) between printing each character. A smaller value results in faster typing, while a larger value slows it down.
    • sayWelcome

      public static void sayWelcome()
      Displays the welcome message when the Amadeus application starts. This includes the Amadeus logo, a login sequence, and an introduction.
    • sayGoodbye

      public static void sayGoodbye()
      Displays the farewell message when the Amadeus application is exiting. This includes a thematic goodbye message and the Amadeus catchphrase.
    • sayCommands

      public static void sayCommands()
      Displays the list of available commands to the user. The commands are formatted with styling for better readability.
    • sayList

      public static void sayList(ArrayList<Task> taskList)
      Displays the current list of tasks to the user, organized by type (Deadlines, Events, ToDos). If the list is empty, a message indicating no pending tasks is shown.
      Parameters:
      taskList - the list of tasks to display; must not be null.
    • sayTaskAdded

      public static void sayTaskAdded(Task task, String taskType)
      Notifies the user that a task has been successfully added to the list. The task type and details are displayed with formatting for better readability.
      Parameters:
      task - the task that was added; must not be null.
      taskType - the type of the task (e.g., "DEADLINE", "EVENT", "TODO"); must not be null.
    • sayTaskMarked

      public static void sayTaskMarked(int index, boolean status)
      Notifies the user that a task has been marked as complete or incomplete. The task index and new status are displayed with formatting for better readability.
      Parameters:
      index - the index of the task that was marked.
      status - the new completion status (true for complete, false for incomplete).
    • sayTaskDeleted

      public static void sayTaskDeleted(int index)
      Notifies the user that a task has been successfully deleted from the list. The task index is displayed with formatting for better readability.
      Parameters:
      index - The index of the task that was deleted.
    • sayTaskReset

      public static void sayTaskReset()
      Notifies the user that all tasks have been reset and the task list is now empty.