Question: For this assignment, you are to find a solution to a graph problem by utilizing various structures that we have discussed and used this past
For this assignment, you are to find a solution to a graph problem by utilizing various structures that we have discussed and used this past semester. You will be able to choose the language of your choice however I will mostly only be able to assist if you choose to use C++. Below you will find the details of the problem, think about what you must achieve and plan your approach BEFORE starting to write code.
For this project you will be in charge of helping travelers schedule their trips on trains which are leaving and arriving at various stations. You are to create a program that will let a user find a path between two stations among other features. You will be provided with two files: trains.dat which will have the schedule of trains running between stations and stations.dat which contains the list of stations that are in your train network. Your program will provide the following functionality:
- Print complete train schedule
o Output: Prints off the complete train schedule for the day. Should state what station the train is departing from, at what time it departs, where it will arrive, what time it will arrive, and what the travel time between the two stations is.
- For a station number, print the name
o Input: Station Number
- For a station name print the station number
o Input: Station Name
- Determine if there is a direct route from station A to station B
o Input: Departure and Arrival station number
- Is station B reachable from station A
o Input: Departure and Arrival station number
- For any two stations what is the shortest ridding time(hours:minutes) to go from A to B
o Only time spent on train
o If no route exists alert the user
o Input: Departure and Arrival station number
- Find the shortest OVERALL travel time
o Time riding the train and time waiting for layovers at other stations
o Input: Departure station number, Arrival station number, time you will arrive at your departure station in 24 hour time(HH:MM)
File Format
stations.dat
station number - [0->99] not necessarily in order
station name max length of 25, no spaces
Example file
0 Madison
1 Brookings
2 Sioux_Falls
3 Fargo
trains.dat
departure_staiton number: 0-99
arrival_station number: 0-99
departure_time: 0-1440
arrival_time: 0-1440
Departure time and arrival time are in terms of minutes since midnight
No trains will run past midnight

TRAIN MATE 3000 Print schedule Look up station by number Look up station by name Find nonstop train Is service available Shortest ride time shortest travel tine (coming soon option -brooking leavea at 500 and arrives at 2-huron at 510 and 10 min total -brookings leaves at 230 and arrives at 1-madison at 240 hr and 10 min total -madison leaves at 10 and arrives at 4-sioux falls at 85 1 hr and 15 min total rapid city leaves rapid city 1eaves a 300 and arrives at 0 brookings at 400, 1 hr and 40 min total -sioux Falls leaves at 20 and arrives at 3-rapid city option: 1 Enter Station number Station 2 huron option Enter departure station number: 0 Enter arrival station number: 4 No direct route available option 4 Enter departure station number: 1 Enter arrival station number: 3 There is a route from madison to rapid city ption ter departure station number: 1 o go from from madison to haron you will Eeed to ride the train for3 hours and 43 inutes nter departure station Rumbers t what time vill you arrive at the station travel time, when leaving at leave Falls at 13120 asd arrive at BE00 Kings at 14 Brookings at 0:10 and Rapid City at TRAIN MATE 3000 Print schedule Look up station by number Look up station by name Find nonstop train Is service available Shortest ride time shortest travel tine (coming soon option -brooking leavea at 500 and arrives at 2-huron at 510 and 10 min total -brookings leaves at 230 and arrives at 1-madison at 240 hr and 10 min total -madison leaves at 10 and arrives at 4-sioux falls at 85 1 hr and 15 min total rapid city leaves rapid city 1eaves a 300 and arrives at 0 brookings at 400, 1 hr and 40 min total -sioux Falls leaves at 20 and arrives at 3-rapid city option: 1 Enter Station number Station 2 huron option Enter departure station number: 0 Enter arrival station number: 4 No direct route available option 4 Enter departure station number: 1 Enter arrival station number: 3 There is a route from madison to rapid city ption ter departure station number: 1 o go from from madison to haron you will Eeed to ride the train for3 hours and 43 inutes nter departure station Rumbers t what time vill you arrive at the station travel time, when leaving at leave Falls at 13120 asd arrive at BE00 Kings at 14 Brookings at 0:10 and Rapid City at
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
