depth-first search traversal using general classdfswhich has methodexecutewhich takes as input the grapha start vertexand any auxiliary information neededand then initializes the graph and calls the recursive methoddfstraversalwhich activates the dfs traversal our implementation assumes that the vertices and edges are decorable positionsand it uses decorations to tell if vertices and edges have been visited or not the dfs class contains the following methods to allow it to do special tasks during dfs traversalsetup()called prior to doing the dfs traversal call to dfstraversal(initresult()called at the beginning of the execution of dfstraversal(startvisit( )called at the start of the visit of traversediscovery( , )called when discovery edge out of is traversed traverseback( , )called when back edge out of is traversed isdone()called to determine whether to end the traversal early finishvisit( )called when we are finished exploring from result()called to return the output of dfstraversal finalresult( )called to return the output of the execute methodgiven the outputrfrom dfstraversal code fragment instance variables and support methods of class dfswhich performs generic dfs traversal the methods visitunvisitand isvisited are implemented using decorable positions that are parameterized using the wildcard symbol"?"which can match either the or the parameter used for decorable positions (continues in code fragment