nus-cs2103-AY2425S1 / forum

12 stars 0 forks source link

Code refactoring for comparators #744

Open ngjianyi opened 4 days ago

ngjianyi commented 4 days ago

Hi, I would like to check if it is possible to refactor the comparison logic inside a comparator to the individual classes that are being compared. Instead of accessing the variables and doing a comparison, I would like to shift the logic into a compareTo method inside the compared class itself. The logic itself will not be changed. Thank you!

damithc commented 4 days ago

@ngjianyi Allowed, if the external behaviour is unaffected.

Note the following too. image