world to the code realization excessively. ---> such as: The attribute of the class is described in words, and the behavior functionFour: Implement Layer class Diagram---> Implementation layer views that the class is the description of the implementation code, and the classes in the class diagram map directly to the e
This essay is good, the use of PHP to explain the UML (or conversely) can be said to be an innovation, through this article, I also found a good station: www.phppatterns.com. The translation of the UML terms comes from the Unified Modeling Language User Guide, which I am looking at. UML (Unified Modeling Language, Unified Modeling Language) is a mechanism for rep
the relationships between classes
Inheritance Relationship
An inheritance relationship is the most understandable relationship. The picture is like this. The object-oriented argument is the is-a relationship. That is to say Class2 is a Class1. In C + + we say that Class2 is a derived class of Class1, or that Class1 is the base class for Class2.
Aggregation and Composition
Start with a relationship that is easy to understand. There is often a case where a class is a data member of another class.
first, the basic concept
UML as a unified Modeling language, is a model of language, then the model is mainly used to represent, this time naturally generated UML diagram. UML mainly consists of basic building blocks, rules and public mechanisms, in which the basic building blocks consist of things, relationships and
representation:
Represented by cubes
Add keywords
Rational Rose:Draw processor and device in deployment under commonent View
The system deployment diagram is shown as follows:Result Analysis
UML is the abbreviation of unified modeling language. UML is a product in software-intensive systems (various products generated during software development, such as
1, what is UML
UML class diagrams can quickly examine code structures.
2. Theme
The use of UML class diagrams in Pycharm.
3. Preparation work
(1) Pycharm version is 2.7 or higher
(2) Installing the Python Interpreter
(3) UML Plug-ins and
teams. For example, business analysts can use class or object graphs to model current assets and resources, such as ledger, product, or geographic layers. Architects can use components and deployment diagrams to test/confirm whether their designs are adequate. Developers can use class diagrams to design and write documents for the system code (or code to be written) class.
Special Class
repetition, there is a list in a, which holds the B object's n references , that's it.Well, to here, already put the above diagram of the relationship is finished, I hope you can have some gains, I also spent a lot of time ah (drawing, generate code, write to the blog, alas, a sweat). But it's worth it if you can get a thorough understanding of these relationships in U
overall and partial relationship between classes, but in a composite relationship the whole object can control the life cycle of the member object, and once the whole object does not exist, the member object will not exist, and the member object has a die relationship with the whole object . In UML, a composite relationship is represented by a straight line with a solid diamond. For example: The head (head) and Mouth (Mouth), the mouth is one of the
, generalization (generalization):is a class (called a subclass, sub-interface) that inherits the functionality of another class (called a parent, parent interface) and can augment its own new functionality, which is the most common relationship between classes and classes or interfaces and interfaces, and in Java such relationships are explicitly identified by the keyword extends. Represented by an implementation with a hollow arrow. "Other relations
Four types of relationships and code implementation of class diagrams in UML, and four types of uml
In the uml diagram, the most complex relationships are generalization, implementation, dependency, and association, if you understand these relationships, you will become fami
Objectiveclass diagrams and sequence diagrams are two of the most commonly used diagram in UML. I will make a detailed summary. In many books, or Web sites, when introducing the design of a subsystem of a system, many times, a simple class diagram is given to describe the relationship between the classes that make up the subsystem. This is sufficient to illustrat
inheritance relationships between classes and interfaces. Figure H
650) This. width = 650; "src =" http://pic002.cnblogs.com/images/2012/285763/2012061315050938.gif "style =" margin: 0px; padding: 0px; Border: 0px; "/>
1.1.6 implementation (realization): Expressed by hollow arrows and dotted lines
Instance (FigureI) Link specifies a contract between two entities. In other words, one entity defines a contract, and the other entity guarantees the performance of the contract. When modeling
as parent and child, animals and tigers, plants and flowers.The code generated by ROSE is as follows:# Include "C11.h"
Class C12: public C11
...{
};
5. Template
Here, by the way, the template
The code for the above figure is as follows:Template Class C13
...{
};
Let's talk about the degree of repetition. In fact, after reading the above description, we should be clear about the relationship between the
association can be bidirectional or one-way (#add还有自身关联). Two-way associations can have two arrows or no arrows, and one-way associations have an arrow.3. In Java or C + +, association relationships are implemented by using member variables.
Class Apprentice{};Class Tang Monk{protected:list};
Representation method: Solid ArrowCharacteristics: Represents a dependency between a class and a class or class and an interface, and
UML, a unified modeling language, is an object-oriented modeling language. It is mainly used to help users perform object-oriented descriptions and Modeling of software systems (by ing users' business needsCodeTo ensure that the Code meets these requirements and can easily trace back the process of requirements), it can describe the entire process of the software development process from requirement analysi
Relationship between classes (1)In a software system, classes do not exist independently. Classes and classes have various relationships. for different types of relationships, UML provides different representations.1. AssociationAssociation is the most common relationship between a class and a class. It is a structured relationship used to indicate the relationship between a Class Object and another class object, such as cars and tires, masters and ap
description, we should be clear about the relationship between the various relations and what the code is like, the so-called degree of repetition, it is just an extension above. For example, if a and B have a "one-to-many" repetition degree, there is a list in a that stores n references of object B, that's all.
Now, I have finished the class graph relationship above. I hope you will get something better. I have also spent a lot of time (drawing, gen
above. For example, if a and B have a "one-to-many" repetition degree, there is a list in a that stores n references of object B, that's all. Now, I have finished the class graph relationship above. I hope you will get something better. I have also spent a lot of time (drawing, generating code, writing to blog, alas, a sweat ). However, it is worth it if you can thoroughly understand the relationships of UML
extension above. For example, if A and B have A "one-to-many" repetition degree, there is A list in A that stores N references of object B, that's all.
Now, I have finished the class graph relationship above. I hope you will get something better. I have also spent a lot of time (drawing, generating code, writing to BLOG, alas, a sweat ). However, it is worth it if you can thoroughly understand the relationships of
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.