Explore our Solution Library

Home  »  Solution Library  »  Help me with my Java assignment using DiGraphADT, DiGraphEdge, Edges and Topological Files  »  Number of Views - 1542

Help me with my Java assignment using DiGraphADT, DiGraphEdge, Edges and Topological Files

Question - Ta s k 1 a simple interface DiGraphADT.java file DiGraphEdgeList.java which provides an edge list implementation of the interface an incomplete program Topological.java which reads in a text file, builds a graph from it and displays a topological ordering of nodes. a text file Edges.txt containing some data for a graph for use in the topological ordering program provided for part 3.Part 1: adjacency matrix representation. There should be a single constructor which takes the number of nodes as argument. Part 2: adjacency list representation. There should be a single constructor which takes the number of nodes as argument. Part 3: utilising a queue, as described on slide 3 of the lecture 22 handout. (Note: Queue is an inter ...Read More

Solution Preview - ion; import java.util.Scanner; import java.util.Stack; public class TopologicalSort { private Stack<Integer> stack; public TopologicalSort() { stack = new Stack<Integer>(); } public int [] topological(int adjacency_matrix[][], int source) throws NullPointerException { int num

Original Question Documents

Email your assignment/project

enquiry@allassignmenthelp.com

Want to place an
order on the call?
It's free