rexyyong / pe

0 stars 0 forks source link

unclear exception message for updating cost of grocery #15

Open rexyyong opened 6 months ago

rexyyong commented 6 months ago

Input typed in

cost kailan $-1000

expected output

exception thrown to say negative number not allowed

actual output

image.png

Furthermore Ug claimed that PRICE can be any numerical value. -1000 is a numerical value but it was not accepted. Hence I have classified it a functionality bug

image.png

soc-se-bot commented 5 months ago

Team's Response

In the UG, it says that the price must be a valid numerical value which is implied to be positive since the price is always positive. And unclear error message should be feature flaw and not functionality bugs as the program can run perfectly fine, the program gracefully rejected the negative value. We believe that this bug is not in scope as although the error message can be clearer, there is not issue with the program right now and the current error message is not wrong as a negative cost is quite obvious to be invalid.

image.png

Items for the Tester to Verify

:question: Issue response

Team chose [response.NotInScope]

Reason for disagreement: [replace this with your explanation]


## :question: Issue type Team chose [`type.FeatureFlaw`] Originally [`type.FunctionalityBug`] - [x] I disagree **Reason for disagreement:** I believe this is a functionality bug because the behavior differs from user guide. The user guide states that any valid numerical value can be keyed in. Firstly, numerical value refers to any signed real number. Refer below to documentation from oracle ![image.png](https://raw.githubusercontent.com/rexyyong/pe/main/files/bae08048-9d5e-4936-9f04-2cf5b794df7c.png) Secondly, price can actually be negative. Just like how there can be negative interest rates in economics, price can have negative value as well. Refer to screenshot below. ![image.png](https://raw.githubusercontent.com/rexyyong/pe/main/files/5e201900-c072-467c-95c4-2748c2eae2f2.png) Hence, $-1000 is valid, and also a numerical value. Thus, it should be accepted based on the user guide. However in actuality, it was not accepted. Hence the behavior differs from the UG and it should therefore be a functionality bug.