|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectreservation.system.functions.Functions
reservation.system.functions.Reserve
This class hold Reserve structure. This object allows to reserve to one flight one or many persons by calling the method reserve
in FlightSystem
.
Field Summary |
Fields inherited from class reservation.system.functions.Functions |
arg |
Fields inherited from interface reservation.Action |
fs, NUMBER_ARGUMENT_MAX |
Constructor Summary | |
Reserve()
|
Method Summary | |
(package private) void |
_check(java.lang.String[] arg)
Verify that at least one flight is created. |
java.lang.String |
execute()
Reserve several one or many person in one flight if the command reservation and their arguments are correct. |
static java.lang.String |
usage()
Display the usage for the command reserve . |
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 |
public Reserve()
Method Detail |
public java.lang.String execute() throws java.lang.Exception
reservation
and their arguments are correct.
execute
in class Functions
java.lang.Exception
- if a person name is duplicated or if the person are not registered.void _check(java.lang.String[] arg) throws java.lang.Exception
- Arguments not null
_check
in class Functions
java.lang.Exception
- if the invariants is violatedpublic static java.lang.String usage()
reserve
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |