Please implement in JAVA c) Programming Assignment write a program to determine the connected components in the graph shown on page 591 in the textbook. In case of multiple links between two nodes in the same direction, you can replace them with a single link. Solution Program: DiGraph.java import java.io.*; import java.util.*; public class DiGraph { private int V; private int  count; private int[]  low; private boolean[] visited; private List<Integer>[] graph; private List<List<Integer>> scc; private Stack<Integer>     stack; public List<List<Integer>> getSCC(List<Integer>[] graph) // function to get all strongly connected components { V = graph.length; this.graph = graph; low = new int[V]; visited = new boolean[V]; stack = new Stack<Integer>(); scc = new ArrayList(); for (int v = 0; v < V; v++) if (!visited[v]) dfs(v); return scc; } public void dfs(int v) //function to get depth first search { low[v] = count++; visited[v] = true; stack.push(v); int min = low[v]; for (int w : graph[v]) { if (!visited[w]) dfs(w); if (low[w] < min) min = low[w]; } if (min < low[v]) { low[v] = min; return; } List<Integer> component = new ArrayList<Integer>(); int w; do { w = stack.pop(); component.add(w); low[w] = V; }while (w != v); scc.add(component); } public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println(\"Enter number of Vertices\"); int V = scan.nextInt(); // number of vertices List<Integer>[] g = new List[V]; //graph for (int i = 0; i < V; i++) g[i] = new ArrayList<Integer>(); System.out.println(\"Enter number of edges\"); //edges int E = scan.nextInt(); System.out.println(\"Enter the edges in the graph : <from> <to>\"); // Each edge for (int i = 0; i < E; i++) { int x = scan.nextInt(); int y = scan.nextInt(); g[x].add(y); } DiGraph d = new DiGraph(); List<List<Integer>> SCC = d.getSCC(g); System.out.println(SCC); //print all strongly connected components scan.close(); } } .