nus-cs2103-AY2021S2 / pe-dev-response

0 stars 0 forks source link

Round to 2 decimal places when input is constrained to 2 places as well. #3107

Open nus-pe-bot opened 3 years ago

nus-pe-bot commented 3 years ago

If the input is set to atmost 2 decimal places, what’s the point of rounding?

Screenshot 2021-04-16 at 2.58.26 PM.png


[original: nus-cs2103-AY2021S2/pe-interim#3107] [original labels: severity.VeryLow type.DocumentationBug]

yuheem commented 3 years ago

Team's Response

Hi,

We do not think this is a documentation bug, as we put in the third point intentionally to elaborate on the behaviour of the application if an invalid BG_AMOUNT ( a number with more than 2 decimal places ) is input by the user.

While a valid BG_AMOUNT input format is a positive number containing up to 2 decimal places, if a user input a BG_AMOUNT containing more than 2 decimal places, despite it being invalid, this error can be easily resolved by rounding the number too 2 decimal places. If we simply reject the user's input as invalid when the input BG_AMOUNT containing more than 2 decimal places, it will bring extra trouble for users who accidentally keyed in an extra digit.

We intentionally come up with this potential invalid input resolution method to improve the user experience of our application. As such, we are afraid that what you pointed out is an intentional feature instead of a documentation bug.

Duplicate status (if any):

--