当前位置:网站首页>01_ Description object_ Class diagram

01_ Description object_ Class diagram

2022-06-11 11:40:00 100 pieces of lotus root

 

1.   effect

  • Used in the analysis and design phase of object-oriented software development , Describe the static structure of the system .
  • Describe classes and classes 、 Classes and interfaces 、 Static structure and relationship between interfaces , Describe the structural design of the system . The most basic element : class 、 Interface .
  • General conceptual modeling for applications 、 Detailed modeling 、 Data modeling , Convert the model into programming code .
  • Class diagram is an important model basis for system coding and testing .

 

2.   Elements

  • package (package)
  • class (class)
  • Interface (interface)
  • Relationship (relation)
  • The signal (signal)
  • data type (data type)
  • The original type (primitive type)
  • enumeration (enumeration)

 

 

3.   Range properties

  • +:public
  • #:protected
  • -:private
  • ~:package

 

4.   Relationship

4.1 relation (association)

Ownership , The owner can know the properties and methods of the owner . The owner is the attribute of the owner . Association is divided into one-way Association (unidirectional association) And two-way Association (bidirectional association).

 

 

 

litchi :

 

4.2 rely on (dependency)

Use relationship . The user needs some properties and methods of the user .

 

 

 

litchi :

 

 

 

4.3 generalization (generalization)

Inheritance relationships . Make the successor ( Subclass ) Have the inheritee ( Parent class ) Properties and methods of .

 

 

 

litchi :

 

 

4.4 polymerization (aggregation)

  Describe the relationship between the whole and the parts , Part can exist independently of the whole .

 

 

 

litchi :

 

 

4.4 Combine (composition)

Describe the relationship between the whole and the parts , The part cannot exist independently of the whole .

 

 

 

litchi :

 

 

4.5 Realization (realization)

The methods of the class reflect the behavior of the interface .

 

 

 

litchi :

 

 

 

5.   Robustness( expand )

The border (boundary)

Entity (entity)

control (control)

 

 

6.   Litchi chinensis

 

原网站

版权声明
本文为[100 pieces of lotus root]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203012152236025.html