Write a program that lets the users create a weighted graph dynamically. The user can create a

Question:

Write a program that lets the users create a weighted graph dynamically. The user can create a vertex by entering its name and location, as shown in Figure 29.27. The user can also create an edge to connect two vertices. To simplify the program, assume that vertex names are the same as vertex indices. You have to add the vertex indices 0, 1, . . ., and n, in this order. The user can specify two vertices and let the program display their shortest path in red.image

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: