EnggRoom

Full Version: Bus Information System
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Bus Information System
Description :
A Bus Company has about 50 Buses. These Buses service 10 different routes, each
route has only one stopover. For example, two routes may be Delhi-Noida-Meerut
and Delhi-Indirapuram-Meerut. All the bus routes start from the same city Delhi,
however, they may have same or different stopover and destination city. (You may
assume that no two routes are identical.) There are about 15 cities covered by the
Bus company. Each Bus route includes information about the distance between
various cities and time taken between two cities by that route. For example, for the
route Delhi-Noida-Meerut, the distance and time taken between Delhi-Noida and
Noida-Meerut will be recorded. The Buses return using the reverse route after a
stop time of 1 hr at the destination. The Buses depart for one route after every 6
hours with the first bus starting at 5 a.m.
Use suitable data structure to create this system. Your system should be such that it
should try to answer the following queries:
• Given a source – destination (can be a stopover also) by a customer, the software should give the route number of the path that takes the shortest time from the source to destination. Please note that there may be some source-destination pairs that may not be connected directly or indirectly.
• The time at which next bus from a source be available for a given source-destination pair.
• List all the routes for a given source-destination pairs
• List all the routes and return routes

You may add more queries and more functionality into the system.