Shortcut for denoting or implying getters and setters in UML class diagrams
问题 In a UML class diagram, if a class has 5 private attributes that need to be mutable and readable, the UML gets pretty ugly with 10 get/set methods even without any of the class' interesting functionality: Ugliness aside, I feel like the UML should focus on the class' more interesting functionality. Am I correct? Is there some standard shortcut for denoting or implying getters and setters for private attributes? 回答1: You are correct: there is no need to include the (noise of) "boilerplate"