For this assignment, you are to find a solution to a graph problem by utilizing
ID: 3796574 • Letter: F
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 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)
stations.dat
<station_number> <station_name>
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 station> <arrival station> <departure time> <arrival time>
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 atExplanation / Answer
A)
HTML and CSS, along with JavaScript and perhaps PHP for interactivity. If your focus is mostly/only on building a mobile app, then you can dive right into learning Objective-C for iOS apps or how to program with Java for Android . it's best to start with learning the basic concepts of programming and how to "think like a coder." That way, no matter what your first programming language, you can apply those skills towards learning a new one.We've featured several other excellent resources for learning to code over the years, such as interactive course Codecademy, but even with those you still need to choose which language to start with.The Most-Often Recommended Programming Languages for SOA World points out that because many languages are modeled after each other, the syntax or structure of working on them is often nearly identical, so learning one often helps with learning the others.C is one of, if not the, most widely used programming languages. There are a few reasons for this. As noted programmer and writer Joel Spolsky says, C is to programming as learning basic anatomy is to a medical doctor. C is a "machine level" language, so you'll learn how a program interacts with the hardware and learn the fundamentals of programming at the lowest.C is stricter and has a steeper learning curve than other languages, and if you're not planning on working on programs that interface with the hardware .
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.