ollayf / pe

0 stars 0 forks source link

Uncertain storage location of Parser Object #12

Open ollayf opened 1 year ago

ollayf commented 1 year ago

Screenshot 2023-04-14 at 5.37.35 PM.png

In the code, after this Parser object is instantiated, where is it stored? Is it a variable in the DinerDirector class?

nus-se-bot commented 1 year ago

Team's Response

Regarding the storing of the Parser object, if the user referred to the Sequence diagram, it would be clear that it is indeed stored in the DinerDirector class when it has been instantiated.

Hence, our team decided to reject this bug as the information he is looking for is shown in the Sequence diagram.

image.png

Items for the Tester to Verify

:question: Issue response

Team chose [response.Rejected]

Reason for disagreement: Ok, first of all I agree that the original post is answered. In the original post I asked that because I was confused as to why if it was instantiated in the DinerDirector, why would it not be stored as an attribute?

However, although that documentation question is answered now I think there is a Design issue. Why is there a parser object instantiated every time the program loops? Should it not be done once then the same one can be used to run Parser.parseCommand. Is there a need to do this? Because this has the potential to cause memory leaks if devs in the future forget to delete and remove this properly. Generally, minimise instantiation, I would suggest.