- 0
- 0
- 约3.07万字
- 约 75页
- 2021-11-30 发布于安徽
- 举报
* * * * * * * * * * Class Diagram class name attributes methods composition dependency, friend function Align elements as possible No cross lines, no diagonal lines Diagram of One Class Class name in top of box Write interface on top of interfaces names Use italics for an abstract class name Attributes Should include all fields of the object Also includes derived properties Operations / Methods May omit trivial (get/set) methods But dont omit any methods from an interface! Should not include inherited methods Class Attributes Attributes (fields, instance variables) visibility name : type [count ] = defaultValue Visibility: + public # protected - private ~ package (default) / derived Underline static attributes Derived attribute: not stored, but can be computed from other attribute values Attribute example:- balance : double = 0.00 Class Operations / Methods Operations / Methods visibility name (parameters ) : returnType Underline static methods Parameter types listed as (name: type) Omit returnType on constructors andwhen return is void Method example:+ distance(p1: Point, p2: Point): double Comments Represented as a folded note, attached to the appropriate class/method/etc by a dashed line Relationships btwn. Classes Generalization: an inheritance relationship Inheritance between classes Interface implementation Association: a usage relationship Dependency Aggregation Composition Generalization Relationships Hierarchies drawn top-down with arrows pointing upward to parent Line/Arrow styles differ based on parent: class : solid, black arrow abstract class : solid, white arrow interface : dashed, white arrow We often dont draw trivial / obvious relationships, such as drawing the class Object as a parent Associational Relationships 1. Multiplicity (how many are used) * ? 0, 1, or more 1 ? 1 exactly 2..4 ? between 2 and 4, inclusive 3..* ? 3 or more 2. Name (what relationship the objects have) 3. Navigability (direction) Multiplicity One-
您可能关注的文档
- 高等数学课件:10-4 函数项级数.ppt
- 高等数学课件:10-5 幂级数.ppt
- 高等数学课件:11.3 复合函数微分法.ppt
- 高等数学课件:11.4 隐函数微分法.ppt
- 高等数学课件:11.5 多元函数微分学在几何上的应用.ppt
- 高等数学课件:11.7 多元函数的极值与最值.ppt
- 高等数学课件:11.7 多元函数的极值与最值(1-36).ppt
- 高等数学课件:11-1 广义积分.ppt
- 高等数学课件:11-1一阶微分方程,可降阶方程.ppt
- 高等数学课件:11-2含参变量常义积分.ppt
- 2025年郑州城市职业学院单招职业技能考试试题及答案解析.docx
- 建筑平法16版和22版区别.pdf
- 2025年洛阳职业技术学院单招职业适应性测试试题及答案解析.docx
- 建筑施工安全事故应急救援预案方案.pdf
- 2025年唐山职业技术学院单招职业技能考试题库及答案解析.docx
- 建筑施工企业班组级(施工监理班组)三级安全培训考试试卷(施工监理与安全措施).pdf
- 2025年宁夏回族自治区银川市高职单招职业技能考试试题及答案解析.docx
- 2025年广西金融职业技术学院单招综合素质考试题库及答案解析.docx
- 2025年安徽国际商务职业学院单招职业适应性测试题库及答案解析.docx
- 2025年黑龙江建筑职业技术学院单招职业适应性测试试题及答案解析.docx
最近下载
- 明代宗教信仰与思想控制.docx VIP
- 江苏省南通市2024-2025学年高二上学期期末学业质量监测语文试卷(含答案).pdf VIP
- 国就有成人演出的电影了?想看就要冒生命危险.pdf VIP
- 综合素质练习题及答案.doc VIP
- 2020-2021学年北京高三化学二轮复习 反应原理型简答题(突破二卷)(word版 含答案).docx VIP
- 电力拖动控制线路安装与检修(白银矿冶职业技术学院)知到智慧树答案.docx VIP
- 煤炭巷道掘砌工(高级工)资格考试题库(全真题库).docx VIP
- 影像叙事中情感共鸣生成机制.docx VIP
- 同轴二级圆柱齿轮减速器的设计(硬齿面).doc VIP
- 基于GPU多线程多通道图像高速重构方法、设备及介质.pdf VIP
原创力文档

文档评论(0)