java Graph program Write a loop to keep interacting with the user until they ask
ID: 3695737 • Letter: J
Question
java Graph program Write a loop to keep interacting with the user until they ask to get out (-1) use .nextInt( ) and no need to handle exceptions if user enters text) In that loop: 1. Display the current vertex 2. display the possible neighbors from the current vertex 3. ask the user for their choice of a vertex to go to 4. if their choice is -1 then exit 5 if the user enters a value too large or too small report an out of range error 6. if their choice is a valid neighbor then change the current vertex to that choice 7.if their choice is not a valid neighbor then report the vertex they entered is unreachable o assume user will enter an int.