In this programming assignment, you will combine the various components of the Prolog programming language that you learned this semester. The program will be based on flight data, which is the same data from your Python and Erlang assignments but it has been converted to a collection of Prolog facts that represent a relational database:
• airline(Airline_Code, Airline_Name)
• airport(Airport_Code, Airport_Name, City, State)
• flight(Date, Airline_Code, Flight_Num, Origin_Airport_Code, Dest_Airport_Code, Scheduled_Departure, Departure_Time, Departure_Delay,
Scheduled_Arrival, Arrival_Time, Arrival_Delay)
The description of the data can be found in the Erlang assignment. However, ALL strings have been converted to ATOMS in Prolog, using single-quotes. Numeric data is stored as numbers.
Your program will answer 5 questions over the Prolog database of flight_information facts:
1. Given a date, origin and destination airport codes, return a list of flight tuples for that route on that date sorted by scheduled departure time.
?- flights_date_route(+Date, +Origin, +Destination, -NumberOfFlights, -SortedFlightTuples).
2. Given an airline code, return a list of tuples of the unique routes flown, sorted by Origin airport code: route(Origin_Airport_Code, Destination_Airport_Code).
?- airline_routes(+Airline_Code, -Airline_Name, -Routes).
3. Given a date, return the flight with the longest arrival delay and the flight with the longest departure delay.
?- longest_date_delay(+Date, -FlightLongestArrival, -FlightLongestDeparture).
4. Given an airport code, return the name of the airport and find the number of delayed origin flights and the number of delayed destination flights. Recall that a flight is considered delayed if the delay is more than 15 minutes.
?- airport_delays(+Airport_Code, -Airport_Name, -NumberDepartureDelays, -NumberArrivalDelays).
5. Given an airline code and date, return the number of total flights on that day and the airline’s ontime percentage. Recall that a flight is on time if it is within 15 minutes of its scheduled time.
?- airline_date_ontime_stats(+Airline_Code, +Date, -Airline_Name, -NumberOfFlights, -Percentage).
Run the program as follows and provide the results for these queries for inclusion with the submission on Canvas:
o flights_date_route('2015-01-08', 'PHX', 'RNO', NumberOfFlights, SortedFlightTuples).
o airline_routes('WN', Airline_Name, Routes).
o longest_date_delay('2015-01-11', FlightLongestArrival, FlightLongestDeparture).
o airport_delays('PHX', Airport_Name, NumberDepartureDelays, NumberArrivalDelays).
o airline_date_ontime_stats('WN', '2015-01-11', Airline_Name, NumberOfFlights, Percentage).
REMINDER: THIS IS AN INDIVIDUAL ASSIGNMENT!
Only programs that successfully execute will be considered for assessment.
On the due date, you will turn in the following:
1. A document that indicates the status of the implementation that you submitted for assessment along with a statement signed verifying that you followed the academic integrity policy.
2. An electronic copy of your pl file must be turned in through the assignment facility
3. A file that shows the results of your queries. Alternatives:
• Copy and paste of shell execution if running SWI-Prolog locally.
• Screen snippet if running SWI-Prolog in swish on the web.
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme