import java.util.*; interface Graph { // Return the number of nodes public int nodeCount(); // Return the number of edges public int edgeCount(); // Clears graph public void clear(); // Return a list of all nodes public List getNodes(); // Return the list of all edges public List getEdges(); // Add a node public void addNode(String k, Object n); // Add an edge public void addEdge(String k1, String k2); // Add an edge with cost public void addEdge(String k1, String k2, int cost); // Does node exist in graph public boolean hasNode(String key); // Does edge exist connecting n1 to n2 public boolean hasEdge(String k1, String k2); // Return edge public Edge getEdge(String k1, String k2); // Return node public Node getNode(String k); public double getEstimatedCost(Node n1, Node n2); }