Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer with JAVA with comments lines You are engaged to develop an application that helps a manager to determine the shortest route a delivery

Please answer with JAVA with comments lines

image text in transcribed

image text in transcribed

You are engaged to develop an application that helps a manager to determine the shortest route a delivery vehicle needs to use between cities. Having studied CSC1203 - Data Structure and Algorithms, you recognize that this is an application for Dijkstra's shortest path algorithm. To prepare for your proposal, you decide to implement it on your computer. The requirements are listed below. Note that marks are also awarded for presentation of your program output. Requirement 1 - Representation of the map in Figure 1 Represent the city-distance information shown in the map in Figure 1 with a weighted graph using adjacency matrix or link-list. Sembawang Woodlands 5 6 5 Choa Chu Kang 14 6 15 22 5 11 Mandal 3 Punggol Nee Soon 11/15 16 Bukit 16 Ang Mo Kio 8 16 Panjang Changi 5/ 6 18 8 Serangoon 12 5 Joper 11 Thomson 16 18 Tampines Batak Bukit 5 22 6 5 257 10 Nga Payoh 16. Bedok Clement 5 81 Queenstown Marina Bay 2 6 16 Pasir Panjang 10 Outram 6 Bukit 6 15 16 19 59 Jurong 10 19 8 Sonusa Figure 1 Requirement 2 - Implementation Write an interactive program that given the start and destination cities, will determine the shortest route between them and its total distance. It is all right to have 0 distance; ie., start and end at the same city. You can assume that the roads are all bi-direction; ie., vehicle can travel in both directions. The output of your program may look something similar as follow: Start from: Changi To: Choa Chu Kang Path: Changi -> Toa Payoh -> Bukit Timah -> Bukit Batok -> Choa Chu Kang Total distance: 39 Km. Requirement 3 - Test run Test your program by determining the following routes: Changi to Choa Chu Kang Bedok to Bukit Batok Marina Bay to Woodlands Sembawang to Bukit Timah Upper Thomson to Outram Bukit Batok to Tampines . Requirement 4 - Program Complexity Derive the program running time complexity of your algorithm using Big-O notation. State clearly how you arrive at the Big-O notation. Partial marks will be awarded only for stating without showing the work in arriving at your conclusion

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions