From: http://blog.csdn.net/onetree2010/article/details/6197463
In Visio, the relationship between the package and the class is the inclusion relationship. After the class is dragged into the folder of the package, the relationship is established. The binary Association symbol can be set to aggregation and synthesis.Interface: hollow circle + straight line (Tang Lao duck
PrefaceI have been using php for more than two years. I have prepared to write frequently-used design patterns based on my own practical experience. Of course, before using the design patterns, I must first understand the design patterns, therefore, we will first explain the UML class diagram. Through UML
class is responsible for coordinating other jobs.
After learning about classes and class diagrams, I began to draw class diagrams. This is really a headache. When I was writing a document, I felt very eager to draw a UML diagram, because it was useful at that time, but no
Class diagramThe class diagram shows the construction module of the object-oriented system. Depicts a static view of a model or part of a model, showing the properties and behaviors it contains, rather than describing the function or refinement of the operation in detail. Class diagrams are most commonly used to expres
, after reading the above description, we should understand the relationship between the relationships and specific to the code is how, so-called repetition, is only the above extension, such as A and B has a "1-to-many" of the 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 (
embodiment": member variable"Arrows and points": solid lines with hollow diamonds, diamonds pointing to the whole5. Combination (composition)"Combinatorial relationship": the relationship between the whole and the part, but part cannot leave the whole and exist alone. If the company and the Department is a whole and part of the relationship, no company there is no department.A combinatorial relationship is a relationship that is stronger than the aggregation relationship, which requires that an
embodiment": member variable"Arrows and points": solid lines with hollow diamonds, diamonds pointing to the whole5. combination (composition)"Combinatorial relationship": the relationship between the whole and the part, but part cannot leave the whole and exist alone. If the company and the Department is a whole and part of the relationship, no company there is no department.A combinatorial relationship is a relationship that is stronger than the aggregation relationship, which requires that
Object Class diagram: Class, attribute, connection (Association, generalization, aggregation, combination, dependency), interface, and constraint.
(Note: static attributes are underlined)
Interface ). The operation set used to describe a service of a class or component.
Data Type (datatype ). A type whose va
composite relationships.
Generalization ):
Dependency: for example, logwapper depends on log,
The so-called dependency, the dependency program is relatively speaking, not necessarily because logwapper cannot "survive" without a log ".
In the specific business logic, logwapper needs logs to assist with the completion of a specific task, which is also dependent.
Class "recursion" relationship and "Triangle" Relationship
Recur
What is a simple Factory mode:By defining a class specifically, you are responsible for creating instances of other classes that typically have a common parent class. UML class diagram for simple Factory mode: The roles contained in the Simple factory model and the correspon
UML class diagram
Explain UMLClass diagram:
1.
first, check the rectangle of "animal". It represents a class. This type of graph is divided into three layers. The first layer displays the name of the
directly with each other, then these two classes should not have direct interaction, and if one of the classes needs to invoke a method of another class, the call can be forwarded through a third party.
The fundamental idea of this principle is to emphasize the loose coupling between classes, and the weaker the coupling between classes, the more beneficial the reuse, the more weakly coupled class is mo
In UML class diagrams, the following relationships are common:
Generalization (generalization)
Implementation (Realization)
Association (Association)
Aggregation (Aggregation)
Combination (composition)
Dependency (Dependency)
The order of strength of the various relationships:Generalization = implementation > Composition > Aggregation > Association > dependenciesFirst, gene
UML class diagram relationships include association, aggregation/combination, dependency, and generalization (inheritance ). The Association is divided into two-way Association, one-way Association, and self-Association. Let's take a look at what these relationships are and what their differences are.
1. Association
Bidirectional Association:C1-C2: both parties k
UML class diagram relationships include association, aggregation/combination, dependency, and generalization (inheritance ). The Association is divided into two-way Association, one-way Association, and self-Association. Let's take a look at what these relationships are and what their differences are.
1. Association
Bidirectional Association:C1-C2: both parties k
Before learning UML class diagrams, recommend a good website with lots of open source projects: Http://www.oschina.net/project. Also recommend an open source project: STARTUML, all of the following class diagram and the diagram between the classes are drawn with STARTUML. Le
Class diagram, the British Civilization Yue: Class diagram, then the class is after how magical transformation, into a class diagram? As we all know, classes are descriptors of a set of
This article reprint casually, Please retain the Source: http://blog.csdn.net/dylgsy/
UML class diagram relationships include association, aggregation/combination, dependency, and generalization (inheritance ). The Association is divided into two-way Association, one-way Association, and self-Association. Let's take a look at what these relationships are and wh
, the object as a local variable, call the static method of the class. The class that is called within the parentheses of a class function is dependent on itself. Because this relationship is weakly connected, from the point of view of high cohesion and low coupling, such code is optimally organized, whether it is object-oriented or process-oriented.There is a sp
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.