In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to understand the UML design pattern, the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have some understanding of the relevant knowledge after reading this article.
1.UML
What is 1.1UML?
A visual language that creates a program model, the so-called program model, is the graphical representation of the program.
1.2 Why use UML
Mainly for communication, communication needs to be carried out on a standard platform, such as Chinese communication, will be carried out on the Chinese platform. UML provides a standard for describing program models, allowing developers and customers to communicate better.
In order to communicate clearly, UML defines different diagrams to specifically represent different types of information, which can clearly express our understanding of the system and whether it is consistent with others.
In order to communicate accurately, UML forces the designer to think carefully about his design before communication, because he needs to draw his design in UML.
Diagrams in 1.3UML
1.3.1 introduction
Use case diagram, pay attention to the interaction between the system and the customer, that is, what can the customer do to the system?
Activity diagram, pay attention to the business workflow, business logic.
An interaction diagram that focuses on how a business or program interacts with each other.
Class diagram, focusing on the relationship between classes.
The state diagram focuses on the different states between the objects of the system and the transition between the states.
Configuration diagram, focusing on how to configure between different modules.
1.3.2 Class Diagram
The most basic UML diagram is the class diagram, which describes classes and shows the relationships between classes.
1. Describe a single class:
It is important to note that the class name is italic to indicate that the class is abstract; the symbols in front of properties and methods in the class diagram represent the accessibility of property and method members. Generally speaking, they are:
Public: marked with a plus sign (+).
Protected: marked with (#).
Private (Private): marked with (-).
Describe the relationship between classes:
Class to class can be divided into four kinds of relationships:
Generalization relationships in UML class diagrams, such as derivation, inheritance, ownership. Just as people can be divided into men and women.
A combination relationship in a UML class diagram in which one object An is part of another object B, and this part of A cannot exist independently. Like tires and cars, a car cannot be called a "complete" car without tires, or its function is incomplete.
An aggregation relationship in a UML class diagram in which one object An is part of another object B, but A can exist independently and does not affect object B. Just like the plane and the airport, the plane flies away, and the airport is independent, independent of the presence or absence of the plane.
The usage relationship in the UML class diagram in which one object A uses another object B. Just like a car uses a gas station.
1.3.3 interaction diagram
The class diagram can only show the static relationship between classes. To show how the objects of the class work together, you need to use the interaction diagram.
An interaction diagram is a UML diagram that shows how objects interact with each other.
Remember the role of UML diagrams, it is just to improve your design and help express your design, it is just an auxiliary tool. So don't think too much about creating diagrams in the right way, just think about the conceptual way to express your design.
Of course, this means that you should not use UML in a non-standard way, which is not conducive to correct communication.
When drawing, you only need to consider the ideas you are trying to express.
On how to understand the UML design pattern to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.