Open ollayf opened 1 year ago
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.
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.
In the code, after this Parser object is instantiated, where is it stored? Is it a variable in the DinerDirector class?