I have to do the following task: "You have a graph G(V,E) and to of its vertices x and y . Write a program that finds the shortest way between 2 vertices , by the number of vertices.
I don't understand if it's up to me to decide whether this graph is directed or not or whether I should have a edge class or what kind graph implementation to make. This is the first exercise in the chapter "Trees and graphs" of my book(Introduction to programming with java) and I don't know where to begin. How would you do it and why ?