Cate an algorithm in java which will provide the


Create an algorithm in java (or C++/ Python/PHP) which will provide the Dijkstras shortest path in a graph provided by the user.

The program should request input for the number of vertices, request a weighted Matrix, request a source and a destination. The output should display the shortest path

Objective:

Work in teams of up to 3 people to create an algorithm in java (or C++/ Python/PHP) which will provide the Dijkstras shortest path in a graph provided by the user. The program should request input for the number of vertices, request a weighted Matrix, request a source and a destination. The output should display the shortest path.

Requirements:

- Create a function called "dijkstraAlgorithm"

- Create a function called "evaluateNeighbours"

- Create a function called "main"
o Include an " int adjacency_matrix[][]";
o Include an " int number_of_vertices"

- Ask the User the following Questions:
o "Enter the number of vertices"
o "Enter the the Weighted Matrix for the graph"
o "Enter the source "
o "Enter the destination"
o Output: "The shortest path from " x "to " y" is " z

Documentation

- In the source code, there should be an introduction that explains how to run the code, and what the algorithm will do. This is in the form of comment at the beginning of the file. It should contain a brief explanation of the algorithm, the list of functions, and brief explanation of what they do.

- Each Function should have documentation explaining key parameters.

- There should be line comments for all important statements in the code.

- Include 2 sets of test cases: Include a suggested set of input data and then the corresponding output for reference.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Cate an algorithm in java which will provide the
Reference No:- TGS01390196

Now Priced at $50 (50% Discount)

Recommended (94%)

Rated (4.6/5)