This C++ program allows users to input the names of the source and destination bus stop in Pune city. It then calculates and displays the shortest route and fare between the two stations.It will also be having a map for commuter’s better navigation.
The idea is implemented using Graph and Heap data structures. The graph has nodes and edges. Nodes represent a bus stop that will be containing certain information regarding that station. Edges (the connection between two nodes) represent the distance between the two bus stops and the cost of each edge will be equal to the distance between the two of its connecting stations(nodes).
By using different algorithms like Dijkstra, breadth-first search, depth-first search, etc, the shortest path between the source station and the destination station is determined, and accordingly, the fare is being calculated on the basis of the total distance between the two bus stops. Finally, the route between the two bus stops and the total fare is displayed.