COMP2421 Project 4 Solved

30.00 $

Category:

Description

5/5 - (1 vote)

In this project, you will implement Dijkstra’s algorithm to find the shortest path between two cities.

You should read the data from the given file cities.txt and then construct the shortest path between a given city (input from the user) and a destination city (input from the user).

Your program should provide the following menu and information:

  1. Load cities: loads the file and construct the graph
  2. Enter source city: read the source city and compute the

    Dijkstra algorithm (single source shortest path)

  3. Enter destination city: print the full route of the shortest path including the distance between each two cities and the total

    shortest cost

  4. Exit: prints the information of step 3 to a file called

    shortest_path.txt and exits the program

Grading policy:

  1. Yourapplicationshouldhaveallfunctionalitiesworking properly. Twenty marks will be graded for the functionality of the project;
  2. The following notes will make up the remaining 10 marks of the grade:
    1. There has to be adequate documentation and comments in the code (i.e., functions, loops, etc.);
    2. Your code should follow the code convention (i.e., spaces, indentations, etc.); and

c. Your application should contain a menu to allow the user to select which option (s) he would like to run.

  • Project4-m71oyd.zip