Question: Input: Please read [input.txt] as the initial parameter, the parameters will be separated by ' ' (whitespace) Output: Please output the results to [answer.txt], each

 Input: Please read [input.txt] as the initial parameter, the parameters will

Input: Please read [input.txt] as the initial parameter, the parameters will be separated by ' ' (whitespace) Output: Please output the results to [answer.txt], each line outputs a set of calculated shortest path distances, please do not output Additional information in answer.txt (eg: Show list:/ Answer: ...) No need to print anything on the terminal Please implement Dijkstra Shortest Path Algorithm for this question, this question is not limited to STL Container The program file is in the same directory as input.txt and answer.txt, and only a single program file needs to be submitted, named [student number].c or [Student ID].cpp, put the program file in the [No28] folder and upload it together with other files. Wrong naming (cases are considered different), including any other files such as [input.txt] , [answer.txt] , [*.exe], [*.h], points will be deducted for those who output any message in the terminal. [input.txt] The first line: data ratio (0

be separated by ' ' (whitespace) Output: Please output the results to [answer.txt] Each line outputs a set of calculated shortest path distances (how many pieces of data there are, that is, how many lines are output) **Please output the shortest path distance as an integer (int) [answer.txt], each line outputs a set of calculated shortest path distances, please

28. A computer company in the Silicon Valley area (see Figure 11-28) needs to route delivery vehicles between cities on the shortest route. Having studied data structures, you recognize that this is an application for Dijkstra's short- est path algorithm. To demonstrate your proposal, you decide to implement it on your computer. To do so you must complete the following tasks: a. Convert the map in Figure 11-28 to a network and present it to management. b. Modify the graph ADT to store weights in the are nodes. c. Write an interactive program that when given the start and destination displays the shortest route between them. San Rafael San Pablo Bay Pacific Ocean 12 18 3 3 Daly City San Francisco Oakland 19 18 31 21 San Francisco Bay San Lorenzo San Mateo 12 13 Hayward Dublin 6 7 9 Redwood City 5 Fremont 6 Palo Alto 6 Mountain View 35 14 6 / 24 8 Cunertino 7 San Jose FIGURE 11-28 Map of Silicon Valley Area input.txt 2 SanRafael SanMateo Oakland Redwood City output.txt 36 34

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!