nus-cs2103-AY1920S1 / forum

Forum
1 stars 1 forks source link

Sequence Diagram Destroy Markers #146

Closed uggi121 closed 4 years ago

uggi121 commented 4 years ago

In the unabridged developer guide presented in AB3, the sequence diagram for the delete command doesn't destroy the instance 'd' of the 'DeleteCommand' class. Upon scrutinizing the code in the LogicManager class, it is evident that 'd' is futile after the command has been executed. This is because the resultant details are contained in a 'CommandResult' object.

Below the sequence diagram associated with the developer guide, there is an annotation that highlights an inherent defect of PlantUML which makes it unable to render object lifelines correctly when the object is pre-maturely destroyed, as in the case of the 'DeleteCommandParser' object.

This prompts me to ask - is the lifeline of the 'DeleteCommand' object inaccurately shown as continuing because of an error with PlantUML, or is it because of a subtler additional usage later on?

damithc commented 4 years ago

This prompts me to ask - is the lifeline of the 'DeleteCommand' object inaccurately shown as continuing because of an error with PlantUML, or is it because of a subtler additional usage later on?

It's due to the shortcoming of PlantUML. It's supposed to stop at the X.

uggi121 commented 4 years ago

Thank you for the reply Prof. What about DeleteCommand? There is no x marked in the diagram, but I see no further use for it in the caller's code

damithc commented 4 years ago

The X is optional. In most cases it doesn't add much value to the diagram.

uggi121 commented 4 years ago

Thank you Master Damith