// James Stallings // Student ID# V00859712 import javafx

// James Stallings
// Student ID# V00859712

import javafx.util.Pair;
import java.util.*;

We Will Write a Custom Essay Specifically
For You For Only $13.90/page!

order now

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


I'm Sarah!

Would you like to get a custom essay? How about receiving a customized one?

Check it out