A brief introduction to UML Unified Modeling Language

Source: Internet
Author: User
Tags dashed line

(i) UML Overview1, object-oriented software development process:(1) OOA (object-oriented analysis): Establish an analytical model and document it. (2) OOD (object oriented design): The result of OOA is refined by object-oriented thought, and the design model is obtained. (3) OOP (object-oriented programming)2, UML is the results of OOA and ood with a unified symbol to describe and record. 3, UML is already a visual modeling de facto industry standard. 4, do not think of UML as a burden, but as a tool. 5, UML has 13 kinds of graphics, the most commonly used are: Use case diagram, Class diagram, Component diagram, deployment diagram, sequence diagram, activity diagram, state machine diagram.     (ii) use case diagram1, used to describe the series of functions of the system, a use case diagram represents a functional module of the system, consisting of "use case + role", mainly used in the requirements analysis phase. use case: represented by an ellipse. character: represented by a humanoid symbol. dependencies between use cases: denoted by dashed arrows 2, a BBS system use case diagram:     (iii) class diagram1. The class diagram is represented by a three-layer rectangular box, the first layer writes the class name, the second layer contains the properties of the class, and the third layer contains the methods of the class. As an example:2. Three relationships between classes: associations (including aggregation and composition), generalization (and inheritance is the same concept), dependency. 3. Association:(1) associations and attributes are like, the difference: when a property in a class is referenced to another entity, it becomes an association. (2) The association is represented by a solid line, and a solid line with an arrowhead represents a one-way association. 3. Association:(1) associations and attributes are like, the difference: when a property in a class is referenced to another entity, it becomes an association. (2) The association is represented by a solid line, and a solid line with an arrowhead represents a one-way association. (3) An association consists of two exceptions: aggregation and composition. The difference between the two:① Aggregation: When an entity A is aggregated into another entity B, a can also be part of another entity. For example, students can be either a member of the tennis Club or a member of a badminton club. aggregations are represented by a solid line with a hollow diamond frame. ② combination: When an entity Group a synthesizes another entity B, a cannot be part of another entity at the same time. For example, a hand is a part of a person, and when a hand is a part of a person, it cannot be part of another person at the same time. combines a solid line representation with a solid diamond frame. An example diagram of an association relationship is as follows:4, generalization relations: that is, the inheritance relationship, with the hollow triangle of the solid line representation. The implementation of the interface can also be seen as a special kind of inheritance,implement interface relationships with dashed lines with hollow triangles。 The example diagram is as follows:5. Dependencies: If a class's changes cause another class to change, there is a dependency between the two. Common causes of dependency:(1) The changed class sends a message to another class;(2) The class of the change takes another class as the data part;(3) The changed class takes another class as the operation parameter. dependent on a dashed line with arrows , the arrow is on the dependent class side, and the dependency example graph is as follows: (iii) component diagram
1. For a large application, it is usually composed of multiple deployable components. (1) Java: Reusable components are typically packaged into files such as jars, wars, and so on. (2) C + +: Reusable components are typically a library of functions, or DLL (dynamic link library) files. 2. The purpose of the component diagram is to display the dependencies of the software in the system on other software components, such as library functions. Component diagrams typically contain elements such as components, interfaces, ports, and UML withthe rectangle of the symbol represents the component, and the circle represents the interface, and the small rectangle located on the component boundary represents the port。a component interface represents a service specification that it can provide externally, in two representations:(1) a circle represented by a solid line connected to the component boundary;(2) Use a circle that is inside the component. the component relies on an interface represented by a solid line with a semi-circular arc. 3, the component diagram example is as follows: (iv) deployment diagram1. The deployment diagram shows where the different components of the system are physically running and how they communicate between them. 2. Example of deployment diagram: (v) sequence diagram1, the sequence diagram describes the interaction between objects, focusing on describing the message and its time sequence. 2. Example of sequence diagram: (vi) activity map1. Activity diagram = Traditional flowchart + parallel. 2. A process used to describe the activities or methods within a use case to describe process principles, business logic, and workflow. 3, the activity diagram and the state machine diagram belong to the evolution diagram, the Evolution diagram Five elements: The state, the event, the action, the activity, the condition. 4.the activity diagram represents an activity with a rounded rectangle, and a solid line with an arrowhead represents the event. 5. Activity diagram Example: (vii) state machine diagram1. The state machine diagram represents the transformation information between the different States and states of an object, and it is necessary to consider using a state machine diagram when the object's state is greater than or equal to 3. 2, state machine Figure 5 Basic elements: (1) Initial state:represented by a solid circle. (2) Transitions between states:represented by a solid line with arrows. (3) Status:represented by rounded rectangles. (4) Judgment point:use a hollow circle to represent it. (5) Termination point:there is one or more termination points, which are represented by a hollow circle that contains a solid circle inside it. 3, state machine diagram example:

A brief introduction to UML Unified Modeling Language

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.