/take item off stack return st[top--]public int peek(/peek at top of stack return st[top]public boolean isempty(/true if nothing on stack return (top =- )/end class stackx ///////////////////////////////////////////////////////////////class vertex public char label/label ( ' 'public boolean wasvisited/public vertex(char lablabel labwasvisited false/constructor //end class vertex ///////////////////////////////////////////////////////////////class graph private final int max_verts private vertex vertexlist[]/list of vertices private int adjmat[][]/adjacency matrix private int nverts/current number of vertices private stackx thestack/public graph(/constructor vertexlist new vertex[max_verts]/adjacency matrix adjmat new int[max_verts][max_verts]nverts for(int = <max_vertsj++/set adjacency for(int = <max_vertsk++/matrix to adjmat[ ][ thestack new stackx()/end constructor /public void addvertex(char labvertexlist[nverts++new vertex(lab)