Open iantenkai opened 1 year ago
No details provided by team.
[The team marked this bug as a duplicate of the following bug]
Exchanging from higher to lower values currencies may create invalid decimal places for the converted currency
Exchanging from higher to lower values currencies may create invalid decimal places for the converted currency. For example, converting 0.01 USD to JPY returns 1.82 JPY. This should not be possible as JPY, japanese yen, has a lowest denomination of 1 yen: any fraction of that should be invalid.
Perhaps, the program should instead do a rounding or reject the exchange
Steps to reproduce
- convert 0.01 usd to jpy, or any equivalent 0.01 of a higher value currency to a lower value one.
expected outcome
- program either rejects the input or does a rounding
Actual outcome
- adds an invalid value of that currency (programme will add1.82 JPY)
image of bug
[original: nus-cs2113-AY2223S2/pe-interim#1229] [original labels: severity.Medium type.FeatureFlaw]
[This is the team's response to the above 'original' bug]
This issue is not in scope because rectifying it would require that we save the lowest denomination for all currencies, which is something we could implement in a later version. Additionally, this is not as important as the fact that it still converts and monitors exchanging between high and low value currencies. Finally, allowing for very small denominations prevents the loss of currency, which would be a far greater issue.
Items for the Tester to Verify
:question: Issue duplicate status
Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)
Reason for disagreement: A user would never add a fraction of JPY, as it is an invalid value in the real world. this is separate from how the app converts currencies, as while it could be possible that the app internally converts them into invalid values, then rounds it later, invalid values as an input should be prevented entirely.
You can add fractions of currencies that are already a base denomination. For example, the lowest denomination of JPY is 1 japanese yen: there is no such thing as 0.5 yen. Perhaps, the program should instead detect this invalid amount and reject the input.
Steps to reproduce
expected outcome input rejected
Acutal outcome fraction of base currency added
image of bug