Java implementation of graph data structure for CS 241 Class