Complete the solution to the HPAir problem. The input to the program consists of three text files, as follows:
For this input, the program should produce the following output:
Begin by implementing the ADT flight map as the Java class Map. Use the nonre-cursive version of isPath. Since getNextCity is the primary operation that the search algorithm performs on the flight map, you should choose an implementation that will efficiently determine which cities are adjacent to a given city. If there are N cities, you can use N linked lists to represent the flight map. You place a node on list i for city j if and only if there is a directed path from city i to city j. Such a data structure is called an adjacency list; Figure 7-19 illustrates an adjacency list for the flight map in Figure 7-10. Chapter 14 discusses adjacency lists further when it presents ways to represent graphs. At that time, you will learn why an adjacency list is a good choice for the present program. Although you can implement the adjacency list from scratch, you should also consider using N instances of ListReferenceBased, which has a reference-based implementation.
You must also create a class City that implements the Sava . lang.Comparable interface to store the city name. The class City and the previously described adjacency list are the underlying data structures for the ADT flight map.
To simplify reading the input text files, define a class that includes the following methods:
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.