Overview Purpose: The purpose of this assignment is to make you…
Question Answered step-by-step Overview Purpose: The purpose of this assignment is to make you… OverviewPurpose: The purpose of this assignment is to make you practice implementing some graph algorithms and to see how they can be used in a somewhat practical way.Feel free to use as much code as you need from Lab 8 and Lab 9.DetailsYou are to implement a simple information program for a fictional airline.. Your program should be able to handle the following queries as specified in AirlineInterface.java: Load from a file (whose name is input by the user) a list of all of the service routes that your airline runs. These routes include the cities served and the various non-stop destinations from each city. Clearly, you will be interpreting these routes as a graph with the cities being the vertices and the non-stop trips being the edges. To keep things simple, assume that all routes are bidirectional, so that you can use an undirected graph (this is not necessarily an incorrect assumption, as airlines most often fly non-stop routes in both directions). Alternatively, you could use a directed graph, with two edges (one for each direction) for each trip. You can think of these as the current active routes, which would be updated periodically in case a route is cancelled or perhaps snow closes an airport somewhere. The routes (edges) should have 2 different weights: one weight based on the distance in miles between the cities and the other based on the price of a ticket between the cities. There are two example input files in the repository: a4data1.txt and a4data2.txt. Your program may be tested on other data files./** * reads the city names and the routes from a file * @param fileName the String file name * @return true if routes loaded successfully and false otherwise */public boolean loadRoutes(String fileName); Return a set of all city names served by the Airline./** * returns the set of city names in the Airline system * @return a (possibly empty) Set