You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

UML类图属性中~(包默认)与/(派生)符号含义咨询

UML类图中属性符号 ~(package default)和 /(derived)的含义解释

Hey there! Let me break down these two UML class diagram property symbols clearly for you—they’re both part of the standard UML notation, so it’s totally normal to want to get their exact meanings right.

~ (Package Default Visibility)

  • This symbol denotes package-level (default) visibility for a class attribute (or method, for that matter).
  • Put simply: any class that lives in the same package as the attribute’s class can access it, but classes outside that package can’t reach it.
  • It sits right between + (public, accessible from anywhere) and - (private, only usable within the class itself). If you’ve used Java, this is exactly the visibility you get when you don’t add a public/private/protected modifier to a member.

/ (Derived Attribute)

  • The slash marks the attribute as a derived property—it doesn’t hold its own stored data. Instead, its value is calculated based on other attributes (either from the same class or linked classes).
  • For a quick example: imagine a LibraryBook class with checkoutDate and dueDate attributes. A derived attribute like / daysOverdue would be calculated by subtracting dueDate from the current date (if the book is past due).
  • Derived attributes are optional to include in diagrams, but when you do add them, the slash makes it instantly clear they’re computed values rather than stored fields.

内容的提问来源于stack exchange,提问作者Deepak

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.28 07:04:18