nus-cs2113-AY2122S1 / forum

3 stars 1 forks source link

Convention for the words on return arrow in sequence diagram #140

Open theodorekwok opened 2 years ago

theodorekwok commented 2 years ago

May I check what is the convention for the words on the return arrow in the sequence diagram? Are there moments when it can be omitted?

okkhoy commented 2 years ago

When there is a return value: You can write the return value itself (i.e., variable name, with the type), describe the return type (e.g., parsed command), or even nothing when the return value is obvious (e.g., call to getName() should return a name, so can omit such values). The general suggestion, however, is to indicate the return value for clarity of information and uniformness.

When there is no return value, it is acceptable if the return arrow is not shown.

theodorekwok commented 2 years ago

Thanks prof!