Implement a program to process a weighted undirected graph as follows:
Implement a program to process a weighted undirected graph as follows:
(a) Read in the number of vertices V and the number of edges E of the graph followed by its E edges, each in the form u, v, w where 1 <= u, v <= V & w > 0 representing an edge uv with weight w.
(b) Set up and print the adjacency matrix representation of the Graph.
(c) Determine whether the graph is connected.
(d) Find a minimum spanning tree for each component and print the minimum spanning forest in adjacency matrix representation (regardless it has just one or more than one components).