Download presentation
Presentation is loading. Please wait.
Published byGregory O’Brien’ Modified over 9 years ago
1
Class diagram Lection №2
2
Plan Class: name, attributes, operations. Relationships between classes. Interfaces. Objects. Templates. Recommendations for the development of class diagram
3
Class
5
Class: visibility quantum “+” public type. “#“ protected type. "-“ private type.
6
Class: multiplicity [0..1] [0..*] [1..*] [1..5] [1..3, 5, 7] [1..3, 7.. 10] [1..3,7..*]
7
Class color: Соlоr employee_name [1..2] : String visibility:Boolean form:Polygon
8
Class attributes color:Соlоr = (255, 0, 0) employee_name[1..2]:String = Ivan Ivanovich. visibility:Вооlеаn = true. form:Polygon = rectangle. visibility:Вооlеаn = truth.
9
Operations +create() +draw (form: Polygon = rectangle, fill_color Color: = (0, 0, 255)) ask_client’s_account (number_of_account:Integer):Сиггепсу show_message():{"division by zero Error"}
10
Dependency relationship
12
«access» «bind» «derive» «import» «refine»
13
Association
16
Aggregation
17
Composition
18
Generalization
20
Limits {complete} {disjoint} {incomplete} {overlapping}
21
Generalization
22
Interfaces
23
Objects
24
Template
26
Recommendations A well-structured class diagram Is focused on communicating one aspect of a system's static design view. Contains only elements that are essential to understanding that aspect. Provides detail consistent with its level of abstraction, with only those adornments that are essential to understanding. Is not so minimalist that it misinforms the reader about important semantics.
27
Recommendations When you draw a class diagram, Give it a name that communicates its purpose. Lay out its elements to minimize lines that cross. Organize its elements spatially so that things that are semantically close are laid out physically close. Use notes and color as visual cues to draw attention to important features of your diagram. Try not to show too many kinds of relationships. In general, one kind of relationship will tend to dominate each class diagram.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.