Package amadeus

Class Amadeus

java.lang.Object
amadeus.Amadeus

public class Amadeus extends Object
The main entry point for the Amadeus chatbot system.

This class handles user input, processes commands, and manages the execution flow of the chatbot. It initializes the interaction loop, continuously listens for user commands, and executes the corresponding actions until the exit command is received.

The chatbot uses the following components:

  • Speech: For user interaction and displaying messages.
  • Parser: For parsing user input into executable commands.
  • Command: For executing the parsed commands.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static Scanner
    Scanner object for reading user input from the console.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    Awakens the Amadeus chatbot, initializing the interaction loop.
    static void
    main(String[] args)
    The main method that serves as the program's entry point.

    Methods inherited from class java.lang.Object

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

    • scanner

      public static Scanner scanner
      Scanner object for reading user input from the console.
  • Constructor Details

    • Amadeus

      public Amadeus()
  • Method Details

    • awaken

      public static void awaken()
      Awakens the Amadeus chatbot, initializing the interaction loop.

      This method displays a welcome message and continuously listens for user commands. Each command is parsed and executed until the exit command is received. Errors during command execution are caught and displayed to the user.

      The interaction loop includes the following steps:

      1. Read user input from the console.
      2. Parse the input into a Command object.
      3. Execute the command.
      4. Check if the command is an exit command.
    • main

      public static void main(String[] args)
      The main method that serves as the program's entry point.

      This method starts the chatbot by calling the awaken() method.

      Parameters:
      args - command-line arguments (not used in this application).