Question: Please help City file: Create a java class and implement the graph class: class Group01 { public static void main(String [] args) { Group01 mygraph
Please help
City file:

Create a java class and implement the graph class:
class Group01 { public static void main(String [] args) { Group01 mygraph = new Group01(args[0]); mygraph.shortestPath(args[1].get(0)); } }
The main method will create a new graph from the file passed through arg[0].
The file city.txt![class: class Group01 { public static void main(String [] args) { Group01](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4688cd1503_58066f4688cc2171.jpg)
(click the link to download the file) contains the weight between two directly connected cities:
As an example, this list is a part of city.txt![a new graph from the file passed through arg[0]. The file city.txt(click](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4688d4f8fd_58166f4688d42412.jpg)
.
a b 9
a c 5
a e 4
b a 1
b d 2
b g 9
c b 1
c g 8
e g 8
f g 5
f h 2
g c 7
g e 3
The individual letter is the names of a citiesodes in the graph. The integer number following a pair of letters represents an undirected edge between two cities with a weight equal to the value of the integer. All the edges will be strictly positive integers greater than zero. Notice: the index inside each node will stand for a letter. As the example, '0' would represent the city 'a', and 1 would represent the city 'b'.
For the figure below, this is a graph drawing of the city.txt file.

The shortest path method takes a single letter to consider as the starting city and produces the following output:
| a origin b 6 acb c 5 ac d 8 acbd e 4 ae g 12 aeg | b origin a 1 ba c 6 bac d 2 bd e 5 bae g 9 bg |
Consider the driver class would test each of origin by invoking the function mshortestPath(args[1].get(0)).
The output should format as this table. Each line will represent the letter of the possible destination city, the length of the shortest path from the origin to that destination city and the list of letters will be the shortest path.
1736800 7 8 5 4 3 1 5 5 4 5157844959324 abbcdeeeffgghhhhjjjkkilmoppr
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
