Step to reproduce: 1. Run the program. In the "Route Planning System" menu, input 1 to choose "GetRoute". Then in the "GetRoute" menu, input 2 to choose "SearchByLeastTrans". 2. For "Please enter start station:", input Kowlooon Tong. Note that this input is invalid. 3. For "Please enter end station:", input Airport. Note that this input is valid. Actual result: After step 3, system prints "Invalid input!". Expected result: After step 2, system prints "Invalid input!" and restarts the input. This problem is important as the actual message cannot specify which input is incorrect. If the first output is wrong, user should not waste the time to input the second station. Please add a exception catcher right after the first input.
And I just tested this in the SearchByTime option. It has the same problem. Step to reproduce: 1. Run the program. In the "Route Planning System" menu, input 1 to choose "GetRoute". Then in the "GetRoute" menu, input 1 to choose "SearchByTime". 2. For "Please enter start station:", input Kowlooon Tong. Note that this input is invalid. 3. For "Please enter end station:", input Airport. Note that this input is valid. Actual result: After step 3, system prints "Invalid input!". Expected result: After step 2, system prints "Invalid input!" and restarts the input. Please fix this while you are at it.
Fixed.