Due: Friday, 10 Jul 2009 (midnight)
Tomorrow morning Jill must travel from Hamburg to Darmstadt to compete in the regional programming contest. Since she is afraid of arriving late and being excluded from the contest, she is looking for the train which gets her to Darmstadt as early as possible. However, she dislikes getting to the station too early, so if there are several schedules with the same arrival time then she will choose the one with the latest departure time. Jill asks you to help her with her problem. You are given a set of railroad schedules from which you must compute the train with the earliest arrival time and the fastest connection from one location to another. Fortunately, Jill is very experienced in changing trains and can do this instantaneously, i.e., in zero time!
2 3 Hamburg Frankfurt Darmstadt 3 2 0949 Hamburg 1006 Frankfurt 2 1325 Hamburg 1550 Darmstadt 2 1205 Frankfurt 1411 Darmstadt 0800 Hamburg Darmstadt 2 Paris Tokyo 1 2 0100 Paris 2300 Tokyo 0800 Paris TokyoSample Output
Scenario 1 Departure 0949 Hamburg Arrival 1411 Darmstadt Scenario 2 No connection
Turn in the Java source code for the program using the submission server. The file name should be Railroads.java and the project is asgn13. Be sure your name is in comments at the beginning of your program as required in the standard header for this class. For your convenience, here is a submission form for this assignment.
|
Course=cse2010 Project=asgn13 |