Bug 275

Summary: Duplicate station output in searchNearby
Product: Group 9: Route Planning Reporter: CherineLee <shiyingli7-c>
Component: Facility SearchAssignee: zixuan.huang
Status: RESOLVED FIXED    
Severity: major CC: shiyingli7-c, zixuan.huang
Priority: Highest    
Version: 1.0   
Hardware: PC   
OS: Mac OS   

Description CherineLee 2018-12-06 08:07:00 HKT
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.
Comment 1 zixuan.huang 2018-12-08 16:26:06 HKT
I believe that the expected result should not be Tai Wai because Tai Wai do not have Toilet service.
Comment 2 zixuan.huang 2018-12-08 17:16:24 HKT
Oops. Sorry, you are right.
The expected result should be:
Kowloon Tong
Che Kung Temple
Comment 3 zixuan.huang 2018-12-08 17:31:30 HKT
Fixed.

I have added a function to check for duplication.