Package amadeus.personality
Class Speech
java.lang.Object
amadeus.personality.Speech
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDisplays the list of available commands to the user.static voidDisplays the farewell message when the Amadeus application is exiting.static voidsayLine()Prints a visual divider line to the console.static voidDisplays the current list of tasks to the user, organized by type (Deadlines, Events, ToDos).static voidPrints text to the console with a typing effect, simulating a character-by-character display.static voidsayTaskAdded(Task task, String taskType) Notifies the user that a task has been successfully added to the list.static voidsayTaskDeleted(int index) Notifies the user that a task has been successfully deleted from the list.static voidsayTaskMarked(int index, boolean status) Notifies the user that a task has been marked as complete or incomplete.static voidNotifies the user that all tasks have been reset and the task list is now empty.static voidDisplays the welcome message when the Amadeus application starts.
-
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
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 benull.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
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 benull.
-
sayTaskAdded
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 benull.taskType- the type of the task (e.g., "DEADLINE", "EVENT", "TODO"); must not benull.
-
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.
-