//end class graph ///////////////////////////////////////////////////////////////class topoapp public static void main(string[argsgraph thegraph new graph()thegraph addvertex(' ')/ thegraph addvertex(' ')/ thegraph addvertex(' ')/ thegraph addvertex(' ')/ thegraph addvertex(' ')/ thegraph addvertex(' ')/ thegraph addvertex(' ')/ thegraph addvertex(' ')/ thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )thegraph addedge( )/ad /ae /be /cf /dg /eg /fh /gh thegraph topo()/end main(/end class topoapp /do the sort ///////////////////////////////////////////////////////////////in the next we'll see what happens when edges are given weight as well as direction summary graphs consist of vertices connected by edges graphs can represent many real-world entitiesincluding airline routeselectrical circuitsand job scheduling search algorithms allow you to visit each vertex in graph in systematic way searches are the basis of several other activities the two main search algorithms are depth-first search (dfsand breadth-first search (bfs