Gabriel Llamas
Gabriel Llamas

Reputation: 18447

Should a design class diagram show private operations?

Should a design class diagram show private operations? I guess that a design class diagram only has to show public methods and the most important private attributes. Am I wrong?

Thanks.

Upvotes: 2

Views: 3356

Answers (1)

Ondrej Tucny
Ondrej Tucny

Reputation: 27974

Unless you are designing the implementation of the class as well, there's no reason to include private members in the design diagram. Private members serve the purpose of being the implementation details of the class and generally the implementation does not matter as long as it adheres to the public contract.

Upvotes: 2

Related Questions