Trusted by 2+ million users, 1000+ happy students everyday
program in C++ using GRAPHSAn airline company needs an abstract data structure to represent the available flights. The company's IT department chose a graph.You must use a graph to write the program required by this assignment.Cities, Connections and Distances, andload.txtfileThe vertices of the graph represent cites. The edges represented the connections between one city and another. The weights represented the distance in miles between the two cites connected by an edge.You choose the cities and connections. Include enough cities and connections that I will be able to meaningful test your program.Make the distances between the cities realistic. You can use Google Maps and round off the distance.These vertices, edges and weights should be stored in a text file named load.txt, which you will turn in with your assignment. When your program starts, it will use the load.txt file to load the vertices, edges and weights into your program.Readme.txt fileDocument in a readme.txt file (which you will turn in with your assignment) the cities and connections you choose, and the distances assigned to each connection. When describing connections, separately list direct connections from through connections.A direct connection means you can fly from the departure city to the destination city without having to first fly through another city. For this type of connection, you list the departure city, the destination city, and the distance between the two cities.A through connection means you can fly from the departure city to the destination city, but you first have to first fly to at least one another city. For this type of connection, you list the departure city, the destination city, each city between the departure city and the destination city which is part of the connection, and the total distance between the departure city and the destination city.Project StartupAs mentioned above, when your program starts, it will use the load.txt file to load the vertices, edges and weights into your graph. The program then will display a menu, and prompt the user to enter a choice:1. Choose departure city2. ExitYou may assume the user enters 1 or 2. No input validation is required.If the user chooses 2. Exit, then the program ends.Program lists Departure Cities, and user choosesIf the user choose 1. Choose departure city, then the program lists the cities. The cities don't have to be listed in any particular order. However, an ascending letter or number should be to the left of each city so the user can use that letter or number to choose a city. For example:
Found this document preview useful?
You are reading a preview Upload your documents to download or Become a Desklib member to get accesss