wj331 / pe

0 stars 0 forks source link

Bug regarding year when adding date #3

Open wj331 opened 1 year ago

wj331 commented 1 year ago

image.png

image.png

As seen, tried to make a booking for year 0000 but return message did not change from previous

Results in an exception as seen above

soc-se-bot commented 1 year ago

Team's Response

We do agree that an appropriate error message should have popped up. However, we feel that it is unlikely users would input 0000 for year. Therefore, according to textbook: "Problems caused by extreme user behaviors: If the problems can only happen in case of deliberate sabotage (e.g., user entered a 30-digit telephone number), in which case it should not be considered a bug. However, if such input can be entered by a user mistake, they should not cause harm e.g., such mistakes should not crash the app, corrupt the data, or make it unusable. Problems caused by integer overflows -- apply the guideline in the previous point."

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: I would agree that it is an extreme user behaviour if the input is 10000 or -10000, but the year 0000 is actually a possible input by the user, especially when the user is inputting a year such as 2000 and accidentally typos the first digit from 2 to 0. This should therefore raise an error message to the user and alert the user. But in this case, nothing was given to me and instead causes a run time exception. A run time exception is dangerous and could potentially cause the program to crash

Furthermore, consider the following point:

image.png

  1. The user does not need to make any booking for DATES that have already passed. This means that ur program should be rejecting any past dates including 2022 or even 0000
  2. If the user enters such a value as a mistake, it raises a RUNTIME exception which is a serious issue. User might experience crash or if not, does not even know what is the error with the input at all
  3. It is important to handle as there could be accidental typos which can lead to such inputs and result in runtime exceptions