booking system

  1. /*
  2.  * Action.java
  3.  * The package reservation contains the different class allowing to choose the action to realise.
  4.  */
  5. package reservation;
  6.  
  7. /**
  8.  * This class uniform the way to call each sub-class (Create, Reserve, Cancel, Lists, Identify) that processes the commands.
  9.  * It delegates to the sub-class the implementation of the function execute (), usage () and check ().
  10.  * Also it masks the machinery and helps the developer who want to reuse the program.
  11.  * @author Texier Mathieu and Frederic Bidon
  12.  */
  13. public interface Action {
  14.     /**
  15.      * Proceed the execution of the action
  16.      * @param arg The argument of the coresponding function
  17.      * @return The apropriate string message
  18.      * @throws Exception When an error occurs
  19.      */    
  20.     String execute (String[] arg) throws Exception;
  21.     /**
  22.      * Maximal number of argument for the command mode
  23.      */    
  24.     static public final int NUMBER_ARGUMENT_MAX = 100;
  25.     /**
  26.      * The instance of the Flight System
  27.      */    
  28.     reservation.system.FlightSystem fs = reservation.system.FlightSystem.getInstance();
  29. }
  30.  
  31.  

contact - link to this site