Bug 492

Summary: printDist() gives larger size than the array returned from calShortestDist()
Product: Group 13 Dating App System (vibing.com) Reporter: Varun <avbalaji2-c>
Component: FloydWarshallAssignee: Phudis Dawieang <pdawieang2-c>
Status: RESOLVED FIXED    
Severity: normal CC: avbalaji2-c
Priority: ---    
Version: 1   
Hardware: PC   
OS: Windows   
Deadline: 2020-10-31   
Attachments: how clearArray is added

Description Varun 2020-11-27 14:39:16 HKT
After testing on the calShortestDist(), the array returned from the calShortestDist() function returns array correctly with correct dimensions. However, when printDist() is called, the array sometimes return with twice dimensions. Problem may occurred with double-counting.
Comment 1 Phudis Dawieang 2020-11-27 14:50:31 HKT
Created attachment 56 [details]
how clearArray is added
Comment 2 Phudis Dawieang 2020-11-27 14:53:04 HKT
Thank you for the bug report. The problem caused by the static array male and female declared and not cleared at the beginning of the program. The clearArray is added in mapInitialize() so that every program startup will clear the array.
Comment 3 Phudis Dawieang 2020-11-27 14:54:48 HKT
(In reply to Phudis Dawieang from comment #2)
> Thank you for the bug report. The problem caused by the static array male
> and female declared and not cleared at the beginning of the program. The
> clearArray is added in mapInitialize() so that every program startup will
> clear the array.