Java Text-Based Graph Theory Program