Step to reproduce: 1. Run the program. In the "Route Planning System" menu, input 2 to choose "Get facility info". Then in the "Get facility info" menu, input 1 to choose "Search a facility". 2. For "Please enter station name:", input Sha Tin. 3. For "Please enter facility type:", input 3 to choose Toilet. 4. System output "Do you want to search nearby stations?", input 1 to choose Yes. Expected result: Tai Wai Actual result: Tai Wai Tai Wai Tai Wai I think the problem is that when you search for nearby stations, you forgot that the adjacent stations are given base on lines, meaning that several lines may give you the same adjacent station.
I believe that the expected result should not be Tai Wai because Tai Wai do not have Toilet service.
Oops. Sorry, you are right. The expected result should be: Kowloon Tong Che Kung Temple
Fixed. I have added a function to check for duplication.