iantenkai / pe

0 stars 0 forks source link

You can add fractions of currencies that are already a base denomination #4

Open iantenkai opened 1 year ago

iantenkai commented 1 year ago

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

  1. add a fraction of any base denomination currency, such as JPY

expected outcome input rejected

Acutal outcome fraction of base currency added

image of bug

image.png

nus-se-bot commented 1 year ago

Team's Response

No details provided by team.

The 'Original' Bug

[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

  1. convert 0.01 usd to jpy, or any equivalent 0.01 of a higher value currency to a lower value one.

expected outcome

  1. program either rejects the input or does a rounding

Actual outcome

  1. adds an invalid value of that currency (programme will add1.82 JPY)

image of bug

image.png


[original: nus-cs2113-AY2223S2/pe-interim#1229] [original labels: severity.Medium type.FeatureFlaw]

Their Response to the 'Original' Bug

[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.


## :question: Issue response Team chose [`response.NotInScope`] - [x] I disagree **Reason for disagreement:** A currency management app should account for variations in base currency.
## :question: Issue severity Team chose [`severity.Medium`] Originally [`severity.VeryLow`] - [ ] I disagree **Reason for disagreement:** [replace this with your explanation]