Q:

(Dynamic graphs) 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

0

(Dynamic graphs) 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.

FIGURE 29.27 The program can add vertices and edges and display a shortest path between two specified vertices. 

All Answers

total answers (0)

Similar questions


need a help?


find thousands of online teachers now