예제 #1
0
 /**
  * Returns all possible itineraries sorted by total cost, form origin to destination leaving on
  * date, with 6 hours or less of transferring from one flight to another.
  *
  * @param date the date of departure
  * @param origin the place of departure
  * @param destination the place of arrival
  * @return String of all possible itineraries sorted by total cost, form origin to destination
  *     leaving on date, with >=6 hours of transfer time
  */
 public static String getItinerariesSortedByCost(String date, String origin, String destination) {
   String res = "";
   ArrayList<Itinerary> itineraries = Client.getItinerariesSortedByCost(date, origin, destination);
   for (Itinerary itinerary : itineraries) {
     res += itinerary.toString() + "\n";
   }
   res = res.trim();
   return res;
 }