Bug 275 - Duplicate station output in searchNearby
Summary: Duplicate station output in searchNearby
Status: RESOLVED FIXED
Alias: None
Product: Group 9: Route Planning
Classification: Unclassified
Component: Facility Search (show other bugs)
Version: 1.0
Hardware: PC Mac OS
: Highest major
Assignee: zixuan.huang
URL:
Depends on:
Blocks:
 
Reported: 2018-12-06 08:07 HKT by CherineLee
Modified: 2018-12-09 13:23 HKT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.