Creating a Reservation - sjc5897/AFRS GitHub Wiki
To create a new reservation, the connection must have had a previous flight query. The Reservation is based off of last flight query, so there needs to be one. The command for querying the flight is reserve,id,passenger.
- id is the id number of the desired itinerary from the flight query.
- passenger is the name of the passenger.
If successful the system will return reserve,successful. The system will give an error if information is incorrect.
The system also allows a user to retrieve reservations. To retrieve a reservation the command is retrieve,passenger,[origin,[destination]].
- passenger is the name of the user.
- origin is the three letter code for the origin airport. This is optional and used to narrow searches.
- destination is the three letter code for the destination airport. This is also optional.
The successful out put is similar to the flight query output, displaying all itineraries that match.
Finally the system allows users to delete reservations. To delete a reservation the command is delete,passenger,origin,destination.
- passenger is the name of the user.
- origin is the three letter code for the origin airport.
- destination is the three letter code for the destination airport.
Upon success, the system will read delete,successful. If unsuccessful, an error will be displayed