I am new to Java and trying to get the shortest path between several cities.
Start
at some point (city) got throughall
the other cities andend
at thesame city
Parsing the date from JSON File:
{ "city": "City1", "latitude": 43.1641506, "longitude": 19.7600896 },
{ "city": "City2", "latitude": 60.4317477, "longitude": 10.0853171 },
{ "city": "City3", "latitude": 21.4317477, "longitude": 16.1854121 },
- The
output
could be the optimal route is City1--> City3--> City2 --> City4 ....
My issue and question is is how to implement the City class that, any suggestions?