Uml-class diagram, package diagram

Source: Internet
Author: User
Tags dashed line

UML Construction Design Model

   A. Class diagram   two. Package Diagram    three. Assembly Diagram    Four. Deployment Diagram   I. Class Diagram     1. Classes: Classes are represented by dig: class names, class properties, operations of classes                class Name: First Letter University               Class properties:-name:string      Visibility Property name: Type  = Default Value                                     visibility consists of 4 types:  + public     -private   # Protected  *package             Operations: + GetName (): String       visibility   action name (parameter): Returns the value type     2. The relationship between the class and the class.            Four kinds: association relation; generalization relation; dependency relationship; Realization Relationship                1. Association relationship &NBsp;                    Meaning: has                   relationship can be divided into 6 kinds:    One-way association, two-way association, Self-Association, multiple Association, combinatorial Association, aggregation Association                    The first four kinds are simple has relationship: for example, Tang's monk has three apprentice.                   The latter two are the relationship between the container and the member:   Aggregation:   such as automobiles and tires, tires are part of the car. At the same time, their life week                 period is not dependent.       combinations: such as interfaces and buttons. Buttons are part of the interface. Also, when the interface is closed, press the                 button to close it.                a.    One-way association:                    Code implementation: Class a{                   class b{...}                                        private B b;                                      ......                                       }

B. Bidirectional correlation C. Self-correlating D. Multi-Sex Association

E. The aggregation relationship is represented by a straight line of the hollow diamond.
            f. The combined relationship      is represented by a solid diamond line.           2. Dependencies                  is a usage relationship.   is indicated by a dashed line with arrows.                 three kinds of situations:  1. An object in one class that uses another class as a parameter.                                         2. An object of another class is used in the method as a local variable.                                         3. Another tired static method was called in the method                 only the first can be shown in UML diagrams, 2,3 can only be found when writing code           3. Generalization relationship                  is represented by a straight line with a hollow triangle.    is the inheritance relationship.           4. Interface and implementation Relationship                  dashed line with a hollow triangle               Additions: The interfaces in Java are divided into three categories:                                 1. Common interface    2. Identity interface   3. Constant interface   function: Improve code readability                          Abstract class and Interface:                         : Neither can be instantiated                            different: Methods in abstract classes can be abstract, can be specific The methods in the  ;   interface are abstract                                       A class may inherit multiple interfaces, but a class can inherit only one class   two. Package Diagram           Package function:  1. Used to prevent naming conflicts   2. For better organizational elements             package diagrams is used to describe the relationship between a package and a package. Relationships between            packages:    import relationship, generalization relationship, nested relationship three. Component Diagram            to describe the relationship between files and documents

Uml-class diagram, package 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.