sec graph implementations class graphm implements graph /graphadjacency matrix private int[][matrix/the edge matrix private int numedge/number of edges public int[mark/the mark array public graphm({public graphm(int ninit( )/constructor public void init(int nmark new int[ ]matrix new int[ ][ ]numedge public int (return mark length/of vertices public int (return numedge/of edges public int first(int /get ' first neighbor for (int = <mark lengthi++if (matrix[ ][ ! return ireturn mark length/no edge for this vertex public int next(int vint /get ' next edge for (int = + <mark lengthi++if (matrix[ ][ ! return ireturn mark length/no next edge/set edge weight public void setedge(int iint jint wtassert wt!= "cannot set weight to "if (matrix[ ][ = numedge++matrix[ ][jwtpublic void deledge(int iint /delete edge (ijif (matrix[ ][ ! numedge--matrix[ ][ public boolean isedge(int iint /is (ijan edgereturn matrix[ ][ ! figure an implementation for the adjacency matrix implementation