nus-cs2113-AY2324S2 / pe-dev-response

0 stars 0 forks source link

Able to add grocery with infinite cost #2535

Open nus-pe-bot opened 7 months ago

nus-pe-bot commented 7 months ago

Perhaps a grocery should not be added in with infinite cost?

image.png

I use listcost to check the cost again, the price of the grocery is infinity.

image.png


[original: nus-cs2113-AY2324S2/pe-interim#2507] [original labels: severity.Low type.FeatureFlaw]

64-1 commented 7 months ago

Team's Response

It is hard to set a max cost of a grocery as we cannot imagine what kind of super expensive grocery the very rich people can buy.. Therefore we deliberately converted super high cost to be displayed as $Infinity. It does not make sense to display lines of "9"s. If it is entered by mistake, the user can simply edit the value again. Since the problem is more likely to only happen in case of deliberate sabotage, it should not be considered a bug, especially when it did not cause any harm to our program, it did not crash but converted the values instead.

Duplicate status (if any):

--