The file citypairs.dat contains selected city pairs and their distances. Each line of the file contains 2 city names and a distance. Write a program to calculate the shortest path between any given city pair. Your program should do the following:
Read in the city pairs and distances.
Implement Dijkstra's algorithm using as the edge cost the given city pair's distance. You should use the priority queue implementation of Dijkstra's algorithm. Input should be via a Java GUI window that asks for the source and destination cities.
Map the cities onto the window and draw the shortest path in the window between those cities. A list of (X,Y) coordinates for each of the cities can be found in the file cityxy.txt. Display in the window the path length of the shortest path.