You are given code that builds a graph representing a city road network using several classes: Location (holds city name), Road (holds from/to Location and a distance/weight), RoadConnection (holds destination Location and distance), and a RoadNetwork class. The existing code constructs the graph by adding roads as unidirectional (one-way) edges,…