UCR CS 181 - Programming Languages (2 pages)

Previewing page 1 of 2 page document View the full content.
View Full Document

Programming Languages



Previewing page 1 of actual document.

View the full content.
View Full Document
View Full Document

Programming Languages

86 views


Pages:
2
School:
University of California, Riverside
Course:
Cs 181 - Programming Languages
Programming Languages Documents
Unformatted text preview:

Programming Languages Fall of 2001 Programming Assignment 1 Basic Travel Agent in Prolog Due Tuesday November 20 2001 Available flights chicago de111 9pm 200 2 hours aa555 8am 250 4 hours aa12 2pm 250 2 hours la co145 6am 150 4 hours denver co156 10am 150 3 hours de333 7pm 450 5 hours newYork aa45 3pm 150 2 hours nw145 8pm 350 6 hours aa123 10am 250 3 hours dallas 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 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 during those 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 12 Price 510 Duration 9 FlightNrs aa125 co24 de234 Departure 9 Price 410 Duration 14 FlightNrs co244 co24 aa23 No more connections available Good Luck 2


View Full Document

Access the best Study Guides, Lecture Notes and Practice Exams

Loading Unlocking...
Login

Join to view Programming Languages and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Programming Languages and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?