nus-cs2113-AY2223S1 / pe-dev-response

0 stars 0 forks source link

Servive Add ID counter #769

Open nus-pe-bot opened 1 year ago

nus-pe-bot commented 1 year ago

There is a duplication check to prevent duplication service but the service counter keeps on counter up. As seen in the discontinuity between 'this' 5013 and 'this 2' 5018

This confuses the user

image.png


[original: nus-cs2113-AY2223S1/pe-interim#802] [original labels: severity.Medium type.FunctionalityBug]

ChengYoghurt commented 1 year ago

Team's Response

We have discussed this problem: And the reason why it's not consecutive is we only check if the service is duplicate after creating the object, and only add it to list when it passes the check. This results in serviceIDs not appear in a contiguous way. But the ID for the service is like the primaryKey for a tuple in Database, the most significant role of which is to distinguish among different services. In our case, the ID plays exactly its role.

Duplicate status (if any):

--