Question: IN JAVA, please write a program that does the following Write a program that reads a weighted graph representing a network, and finds and outputs

IN JAVA, please write a program that does the following

IN JAVA, please write a program that does the following Write a

Write a program that reads a weighted graph representing a network, and finds and outputs the corresponding routing matrix. The routing matrix will be written both to the screen and to an output file. Use Dijkstra's algorithm to find the shortest cost and path between nodes The program runs from the command line with two optional command line arguments. Use the following command line options to indicate the presence ofa command line argument: -i (for input file name) and -o (for output file name). If no command line arguments are present, the program uses "xy_input.txt and xy-output.txt" as default input and output file names respectively. See examples below: java xy_rmatrix java xy rmatrix -o xy rmatrixo.txt java xy _rmatrix -i xy rmatrixi.txt-o xy-rmatrixo.txt Sample Input/Output: Edges are bi-directional A E A D 2 C D 2 C E 2 D E 7 Routing matrix D.2 D,2 C,4 D.4 C,4 A,1 D,4 D I A2 C,6 B.4 A,3 C,6 D.6 C,6 E,2 C,4 C,2 C,2 Write a program that reads a weighted graph representing a network, and finds and outputs the corresponding routing matrix. The routing matrix will be written both to the screen and to an output file. Use Dijkstra's algorithm to find the shortest cost and path between nodes The program runs from the command line with two optional command line arguments. Use the following command line options to indicate the presence ofa command line argument: -i (for input file name) and -o (for output file name). If no command line arguments are present, the program uses "xy_input.txt and xy-output.txt" as default input and output file names respectively. See examples below: java xy_rmatrix java xy rmatrix -o xy rmatrixo.txt java xy _rmatrix -i xy rmatrixi.txt-o xy-rmatrixo.txt Sample Input/Output: Edges are bi-directional A E A D 2 C D 2 C E 2 D E 7 Routing matrix D.2 D,2 C,4 D.4 C,4 A,1 D,4 D I A2 C,6 B.4 A,3 C,6 D.6 C,6 E,2 C,4 C,2 C,2

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!