Commit 8711680
Changed files (1)
src
Q10
src/Q10/README.md
@@ -70,59 +70,102 @@
1. Errors and Warnings
- When an unknown command is entered, the prompt is shown again.
+ 1. When an unknown command is entered, the prompt is shown again.
- ```bash
- モ mvn package
- モ java -cp target/assignment2*.jar ca.mokhan.comp268.App 10
- === Question 10 ===
+ ```bash
+ モ mvn package
+ モ java -cp target/assignment2*.jar ca.mokhan.comp268.App 10
+ === Question 10 ===
- Enter command (Show, Delay, Quit):
- invalid
- Unknown command
+ Enter command (Show, Delay, Quit):
+ invalid
+ Unknown command
- Enter command (Show, Delay, Quit):
- ```
+ Enter command (Show, Delay, Quit):
+ ```
- When an unknown city is entered, an error is displayed.
+ 1. When an unknown city is entered, an error is displayed.
- ```bash
- モ mvn package
- モ java -cp target/assignment2*.jar ca.mokhan.comp268.App 10
- === Question 10 ===
+ ```bash
+ モ mvn package
+ モ java -cp target/assignment2*.jar ca.mokhan.comp268.App 10
+ === Question 10 ===
- Enter command (Show, Delay, Quit):
- Delay Calgary 25
- `Calgary` is not on the schedule
+ Enter command (Show, Delay, Quit):
+ Delay Calgary 25
+ `Calgary` is not on the schedule
- Enter command (Show, Delay, Quit):
- ```
+ Enter command (Show, Delay, Quit):
+ ```
- When a non-numeric value is entered for minutes, an error is displayed.
+ 1. When a non-numeric value is entered for minutes, an error is displayed.
- ```bash
- java -cp target/assignment2*.jar ca.mokhan.comp268.App 10
- === Question 10 ===
+ ```bash
+ java -cp target/assignment2*.jar ca.mokhan.comp268.App 10
+ === Question 10 ===
- Enter command (Show, Delay, Quit):
- Delay Edmonton blah
- Invalid minutes entered
+ Enter command (Show, Delay, Quit):
+ Delay Edmonton blah
+ Invalid minutes entered
- Enter command (Show, Delay, Quit):
- ```
+ Enter command (Show, Delay, Quit):
+ ```
- When a delay of greater than 48 hours is entered, an error is displayed.
+ 1. When a delay of greater than 48 hours is entered, an error is displayed.
- ```bash
- java -cp target/assignment2*.jar ca.mokhan.comp268.App 10
- === Question 10 ===
+ ```bash
+ java -cp target/assignment2*.jar ca.mokhan.comp268.App 10
+ === Question 10 ===
- Enter command (Show, Delay, Quit):
- Delay Edmonton 9999
- Invalid minutes entered
+ Enter command (Show, Delay, Quit):
+ Delay Edmonton 9999
+ Invalid minutes entered
- Enter command (Show, Delay, Quit):
- ```
+ Enter command (Show, Delay, Quit):
+ ```
1. Sample Input and Output
+
+ * Below is an example run of the program.
+
+ ```bash
+ $ mvn package
+ $ java -cp target/assignment2*.jar ca.mokhan.comp268.App 10
+ === Question 10 ===
+
+ Enter command (Show, Delay, Quit):
+ Show
+ 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
+
+ Enter command (Show, Delay, Quit):
+ Delay Edmonton 30
+
+ Enter command (Show, Delay, Quit):
+ Show
+ 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
+
+ Enter command (Show, Delay, Quit):
+ quit
+ ```
+
1. Discussion