UML Simple Comb class diagram

Source: Internet
Author: User


Dependent Dependency
Class car{}class person{    int A;    static int b public    void Buy (Car c) {    int c;    ....    }}


A class is a parameter of a method that has a class, or a local variable, or a static method call, and so on.

In addition, there are two kinds of variables: local variables, member variables.


The variable defined in a method is a local variable, such as the above C.
Called member variables, which are defined directly in the class, are also divided into two instance variables, class variables
The instance variable is the above a

The class variable is the above B;


The following three scenarios

Associating, aggregating, combining three relationships, there is no difference in code, and many of us are semantically differentiating them from each other.



Association Association

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvzgxmmtizmzix/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/center ">

Class student{}class teacher{      list<stundet> stulist;}
A class is a member variable that also has a class


Polymerization aggregation
Aggregations and associations are syntactically consistent.


Just, the class involved in the association is logically a level, such as the student teacher above, but the aggregation involves the class is not a level.

Look at the following example:



It can be expressed as a has a/some B, at which point B is able to separate from a and exist independently. Without a car tire or a tire.


Combination composition

The composition relationship is a bit tighter than the aggregation relationship

The limbs and the people are die.

Non-separable.


As for generalization (generalization) and implementation (realization), we are most often talking about inheritance extends and implementation implements. There's nothing to say.



Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.

UML Simple Comb class diagram

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.