listing graphs continued class stackx private final int size private int[stprivate int top/public stackx(/constructor st new int[size]/make array top - /public void push(int /put item on stack st[++topj/public int pop(/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 lab/constructor label labwasvisited false//end class vertex ///////////////////////////////////////////////////////////////class graph