nus-cs2103-AY2324S2 / forum

16 stars 0 forks source link

Incorrect value displayed - should the success message or the logic of the code be changed? #818

Closed kjw142857 closed 7 months ago

kjw142857 commented 7 months ago

Hi Prof @damithc, we are considering two approaches to modifying a problematic behaviour in our app and would like to see whether either/both of them are allowed.

Which of these two lines of thinking would be allowed to approach the issue while maintaining adherence to the feature freeze?

  1. The issue is in the linkloan command being to accept 2d.p. values, since our v1.3 user guide says it doesn't. We should modify our linkloan (and possibly by extension, editloan?) command(s) to reject values that are more than 2d.p., upon which the success message will always be correct.
  2. The issue is in the success message rounding the loan to 2d.p. We should modify the success message to allow it to show more than 2d.p. in the loan value, and edit the UG to remove the part saying the loan value must be (up) to 2d.p.

Here are some screenshots for reference: image Adding a > 2d.p. loan to the user (not supposed to be allowed...) which succeeds image Success message does not show the loan value correctly image But when viewing the user's loans, the loan value is shown correctly (and it is also stored correctly)

damithc commented 7 months ago

@kjw142857 How about you update the UG to inform users that amounts should not exceed two decimal points as the app behavior is not optimal for any higher precision? Any further tweaks to validity checks can be a planned enhancement.

kjw142857 commented 7 months ago

Hi Prof, thank you for the reply! We will adopt your guideline.

To summarise, here is what we will do: