reservation.system.functions
Class Flights

java.lang.Object
  extended byreservation.system.functions.Functions
      extended byreservation.system.functions.Flights
All Implemented Interfaces:
Action

public class Flights
extends Functions

This class hold Flights structure. This object allows to watch the list of the created flights by calling the command flights in FlightSystem.

Author:
Texier Mathieu and Frederic Bidon

Field Summary
 
Fields inherited from class reservation.system.functions.Functions
arg
 
Fields inherited from interface reservation.Action
fs, NUMBER_ARGUMENT_MAX
 
Constructor Summary
Flights()
           
 
Method Summary
(package private)  void _check(java.lang.String[] arg)
          Verify that at least one flight is created.
 java.lang.String execute()
          Display the list of the flights that are created if the command flights is correct.
static java.lang.String usage()
          Display the usage for the command flights.
 
Methods inherited from class reservation.system.functions.Functions
ArgumentIsValid, CheckBookingListNotEmpty, CheckFlightListNotEmpty, checkInteger, execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Flights

public Flights()
Method Detail

execute

public java.lang.String execute()
                         throws java.lang.Exception
Display the list of the flights that are created if the command flights is correct.

Specified by:
execute in class Functions
Returns:
the names of the different flights created.
Throws:
java.lang.Exception - if the command is not executed.

_check

void _check(java.lang.String[] arg)
      throws java.lang.Exception
Verify that at least one flight is created.

Specified by:
_check in class Functions
Throws:
java.lang.Exception - if it contains arguments or if no flight has been created.

usage

public static java.lang.String usage()
Display the usage for the command flights.

Returns:
the usage.