Class PrintFieldDescendingMetersAboveSeaLevel

java.lang.Object
commandManagers.Command
commandManagers.commands.PrintFieldDescendingMetersAboveSeaLevel
All Implemented Interfaces:
CommandInterface

public class PrintFieldDescendingMetersAboveSeaLevel extends Command
Class PrintFieldDescendingMetersAboveSeaLevel provides output of the meters above sea level in descending order. Extends the Command class.
  • Constructor Details

    • PrintFieldDescendingMetersAboveSeaLevel

      public PrintFieldDescendingMetersAboveSeaLevel()
  • Method Details

    • getName

      public String getName()
      Description copied from class: Command
      Base method for show command name
      Specified by:
      getName in interface CommandInterface
      Specified by:
      getName in class Command
      Returns:
      command name
    • getDescr

      public String getDescr()
      Description copied from class: Command
      Base method for show command description.
      Specified by:
      getDescr in interface CommandInterface
      Specified by:
      getDescr in class Command
      Returns:
      command description
    • execute

      public void execute()
      Overrides the method execute() in the Command class. Prints the meters above sea level in descending order. Checks the argument before execution.
      Specified by:
      execute in interface CommandInterface
      Specified by:
      execute in class Command
    • checkArgument

      public boolean checkArgument(Object inputArgument)
      Overrides the method checkArgument(Object inputArgument) in the Command class. Checks if the argument is null.
      Specified by:
      checkArgument in interface CommandInterface
      Specified by:
      checkArgument in class Command
      Parameters:
      inputArgument - the argument to be checked.
      Returns:
      true if the argument is null, false if not.