Programming Languages Fall of 2001Programming Assignment #1 Basic Travel Agent in Prolog Due: Tuesday, November 20, 2001Programming LanguagesFall of 2001Programming Assignment #1Basic Travel Agent in PrologDue: Tuesday, November 20, 2001Available flights:Query:connection(From, To, Departure, Price, Duration, ListOfFlights).Testing data: (provided by me during testing - do not include in the submitted file!)cancelled(FlightNr).rescheduled(FlightNr,NewDeparture, NewDuration).airport_closed(City, FromTime, ToTime).Additional information:- All times are in full hours using the 24 hour clock.aa123, 10am, $250, 3 hoursladallasdenverchicagonewYorkco145, 6am, $150, 4 hoursaa12, 2pm, $250, 2 hoursde111, 9pm, $200, 2 hoursaa45,3pm $150,2 hoursnw145, 8pm, $350, 6 hoursde333, 7pm, $450, 5 hoursco156, 10am, $150, 3 hoursaa555, 8am, $250, 4 hours- No connection should last more than 24 hours.- There must be at least one hour of waiting time between connecting flights.- If the airport is closed during some hours than no flight can depart or land duringthose hours. All such flights are therefore effectively cancelled.- Do not use negation in your premises. Use "!, fail" if necesary.- Make sure to preserve the exact names and lists of arguments in the query and test data predicates.- Make sure to preserve the exact names of the airports and flight numbers. Examples of test data:cancelled(de66).rescheduled(aa125, 12, 7).rescheduled(aa34, 17, 2).airport_closed(newYork, 8, 12).Sample program run (not using the above data):?- connection(la,newYork, Departure, Price, Duration, FlightNrs).Departure = 12Price = 510Duration = 9FlightNrs = [aa125|co24|de234] ;Departure = 9Price = 410Duration = 14FlightNrs = [co244|co24|aa23] ;No more connections available.Good
View Full Document