diff options
| author | mo khan <mo@mokhan.ca> | 2019-08-04 17:41:55 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2019-08-04 17:41:55 -0600 |
| commit | 5c8ceec47354b73051987776c2bd7b16831d818c (patch) | |
| tree | e8a505280bd47522e66b0c7e05643160482992b6 /src/Q10/README.md | |
| parent | 3c90bf05bbce9d4bcb08cce2ec1f6407fc2b6a26 (diff) | |
add problem statement for Q10
Diffstat (limited to 'src/Q10/README.md')
| -rw-r--r-- | src/Q10/README.md | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/src/Q10/README.md b/src/Q10/README.md new file mode 100644 index 0000000..1cc52b1 --- /dev/null +++ b/src/Q10/README.md @@ -0,0 +1,56 @@ +# Learning Profile for Assignment #2 Question #10 + +## Name: Mo Khan + +### Student ID: 3431709 + +1. Problem Statement + A train timetable for a train travelling between Vancouver and Toronto is + given below. + + | Station | Arrival | Departure | Day | + | --- | --- | --- | --- | + | Vancouver | | 20:30 | 1 | + | Kamloops | 06:00 | 06:35 | 2 | + | Jasper | 16:00 | 17:30 | 2 | + | Edmonton | 23:00 | 23:59 | 2 | + | Saskatchewan | 08:00 | 08:25 | 3 | + | Winnipeg | 20:45 | 22:30 | 3 | + | Sioux Lookout | 05:02 | 05:42 | 4 | + | Hornepayne | 15:35 | 16:10 | 4 | + | Capreol | 00:18 | 00:48 | 5 | + | Toronto | 09:30 | | 5 | + + Store the information from each row of the table in an object. + Then, arrange the objects in an `ArrayList` structure. + + Your program should now take the following commands in a continuous loop: + 1. Show - shows the full table + 1. Delay `<station><minutes>` - the arrival of the train is delayed by `<minutes>` + at station `<station>`; that is, add the delay to the corresponding station + entry. For example, `Delay Edmonton 30` implies that the train would arrive + 30 minutes later than the expected time of arrival in Edmonton. The new + entry would be `Edmonton 23:30 00:29 3`. All stations following Edmonton + will also update their arrival and departure by +30 minutes, and + consequently the day of arrival and departures as well. The result of this + `Delay` commadn is shown below: + + | Station | Arrival | Departure | Day | + | --- | --- | --- | --- | + | Vancouver | | 20:30 | 1 | + | Kamloops | 06:00 | 06:35 | 2 | + | Jasper | 16:00 | 17:30 | 2 | + | Edmonton | 23:30 | 00:29 | 3 | + | Saskatchewan | 08:30 | 08:55 | 3 | + | Winnipeg | 21:15 | 23:00 | 3 | + | Sioux Lookout | 05:32 | 06:12 | 4 | + | Hornepayne | 16:05 | 16:40 | 4 | + | Capreol | 00:48 | 01:18 | 5 | + | Toronto | 10:00 | | 5 | + + 1. Quit - stop the program from accepting any more commands. + +1. Description of the Code +1. Errors and Warnings +1. Sample Input and Output +1. Discussion |
