Graph Connected Homework

Create a MSWindows executable program, or Java program to read in an encoding of a graph of the form of a string:

(1,2,3,4,5)((1,4),(1,5),(5,4),(2,3))

The first set of parentheses contains a list of numbers that represents nodes.

The second set of parentheses is a list of pairs of nodes that represent edges.

The program should output a phrase that indicates whether or not the graph is connected.

The above example represents:

which is not connected.