Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help, with java code thanks! Part B: (10.0 marks) You are engaged to develop an application that helps a manager to determine the shortest

image text in transcribed

image text in transcribed

Please help, with java code thanks!

Part B: (10.0 marks) 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 CSCI203 - 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 Mandal 3 Choa Chu Kang 5/ 6 15 22 Bukit 6 5 11 Punggol Nee Soon 11/15 16 6 4 Bukit 16 8 Ang Mo Kio 6 16 Changi Panjang 7 18 12 8 Serangoon 14 5 Upper 6 11 18 Thomson 16 Tampines Batak Bukit 5 5 Timah 25 5 9 10 10 Toa Payoh 16 Bedok 9 5 Clement 8 Marina Bay Queenstown 6 16 Pasir 5 Outram Panjang 10 8 6 15 16 19/ 22 6 das 19 Jurong 7 Soniusa 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; i.e., 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 Require me nt 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

Step: 3

blur-text-image

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

Informix Database Administrators Survival Guide

Authors: Joe Lumbley

1st Edition

0131243144, 978-0131243149

More Books

Students also viewed these Databases questions