Discuss the below:
Q: Modify the program that implements a 6x6 adjacency matrix for a graph. Remember that an adjacency matrix is a two-dimensional array.
The program should implement the necessary primitive functions on graphs:
updateNode(), insertNode(), insertEdge(), deleteNode(), deleteEdge(), retrieve(), and adjacent().
The program should also include a printGraph() method that prints the adjacency matrix.
The output of the program should appear as follows:
Adjacency Matrix:
0 1 2 3 4 5
0 0 1 1 1 0 0
1 0 0 0 0 1 0
2 0 1 0 0 1 0
3 0 0 0 0 0 0
4 0 0 0 0 0 0
5 0 1 0 1 0 0
The data are:
0: 0
1: 1
2: 2
3: 3
4: 4
5: 5
0 is connected to 1
3 is not connected to 2
Attachment:- adjacenct matrix.rar