java.lang.Object
bcu.cmp5332.bookingsystem.commands.Help
All Implemented Interfaces:
Command

public class Help extends Object implements Command
The Help class represents a command to print the help message of available commands in the flight booking system. It implements the Command interface, allowing it to be executed within the context of a FlightBookingSystem instance.

Upon execution, the command prints out the predefined HELP_MESSAGE from the Command interface. This message includes a list of available commands and their descriptions for user reference.

Example usage:


 // Create a new Help command instance
 Command helpCommand = new Help();
 
 // Execute the command within a FlightBookingSystem instance
 helpCommand.execute(flightBookingSystem);
 
See Also:
  • Constructor Details

    • Help

      public Help()
  • Method Details

    • execute

      public void execute(FlightBookingSystem flightBookingSystem)
      Executes the help command within the provided FlightBookingSystem instance. Prints the predefined HELP_MESSAGE to the console.
      Specified by:
      execute in interface Command
      Parameters:
      flightBookingSystem - The FlightBookingSystem instance on which the command is executed