Write a java program that generates a random connected undirected graph. Your program should include these steps: 1. Ask the number of vertices to the user (n) 2. Create an adjacency matrix of n * n (with undirected edges) 3. Print the matrix 4. Check if the matrix is connected (you can use DFS algorithm) 5. If the graph is not connected make it connected 6. Print the matrix again 7. Apply DFS to find a possible
OR
OR