Graph Exercise with Dijkstra and Longest Path Java Implementations