Advanced Option for Lab 6

If you want to make lab 6 more challenging, write a general-purpose traverse method over graphs that visits every node and computes an answer based on a user-supplied function. Use this general-purpose method to do the regular lab 6 functions, as well as the hasRoute method from class these past few days.