Class diagram for objective C standards?
I'm having trouble finding the standard way a class diagram should be drawn for objective C applications. Mostly:
- Do I incude field types or just the var name? 开发者_C百科
- Do I include method return types and parameters?
Thank you!
Many of the Objective-C diagrams I have seen do not include types or parameters. Only the field and method names are placed in the diagram.
However, I would strongly encourage you to include all this information, regardless of what the norm may be. By doing so, the class diagram is not only useful for modelling, but also serves as documentation. It's not particularly difficult to add the type annotations, and the end result is a far more complete (and useful) picture of the class.
Document them the same way you would document a class in any other object oriented language. Class properties should include the field type, property name and multiplicity. Class methods should include return types and parameters.
精彩评论