// James Stallings
// Student ID# V00859712
import javafx.util.Pair;
import java.util.*;
public class cmsc401 {
// A class to describe a highway between cities
static class Edge {
int source; // the source city
int destination; // the destination city
int fuelCost; // the fuel cost to travel between cities
// Constructor for a highway (Edge) object.
public Edge(int source, int destination, int fuelCost) {
this.source = source;
this.destination = destination;
this.fuelCost = fuelCost;
}
}
// A class to describe a collection of cities and the edges (highways) that connect them.
static class Graph {
int CityCount;
LinkedList adjacencylist;
Graph(int CityCount) {
this.CityCount = CityCount;
adjacencylist = new LinkedListCityCount;
//initialize adjacency lists for all the CityCount
for (int i = 0; i