Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the UML model elements?

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail what the UML model elements are, Xiaobian thinks it is quite practical, so share it with you as a reference, I hope you can gain something after reading this article.

UML model elements

Model elements in UML include things and relationships between things. A thing is an important component of UML and represents anything that can be defined. Relationships can tie things together into meaningful structural models. Each model element has a corresponding graphic element.

1. Things

Things in UML model elements can be divided into structured things, action things, grouped things, and annotated things.

1. Structure of things

Structural things are divided into classes, interfaces, collaborations, use cases, activity classes, components, and nodes

(1) Category. A class is an abstraction of objects with the same attributes, methods, relationships, and semantics. A class can implement one or more interfaces. Classes are represented by rectangles containing class names, properties, and methods.

(2) Interface. An interface is a collection of operations that provide a particular service to a class or component.

3) Collaboration. Collaboration defines interoperability. Some characters work with other elements to provide cooperative actions that are larger than the sum of the elements. Collaboration in UML is represented by a dashed ellipse.

4) Use cases. A use case describes a sequence of actions that the system performs on a particular persona. Use cases are often used to organize action things in models, which are implemented through collaboration. In UML, use cases are represented by solid ellipses with use case names.

(5) Activities. An active class is a class whose class object has one or more processes or threads. In UML, activity classes are represented the same way as classes, except that they are bordered by bold lines.

(6) Components. Components are physically replaceable parts of a system that implement a set of interfaces.

(7) Node. A node is a physical element that exists at runtime and represents a computable resource, usually occupying some memory and having processing power. A collection of components is generally located at one node, but can also be transferred from one node to another.

2. Action things

Action things in UML model elements are dynamic parts of the UML model. They are verbs of the model that represent actions in time and space. Interaction and state machine are two of the most basic dynamic thing elements in UML model.

1) Interactions. Interaction is a series of actions composed of a group of objects exchanging messages in a specific context to achieve a specific purpose. Each action of the objects that make up the action in the interaction is listed in detail, including the message, the number of actions (the action that the message produces), and the connection (the connection between objects).

(2) State machine. A state machine consists of a series of states of objects.

3. Group things

Group things are organized parts of the UML model, and there is only one type of group thing, called a package.

4. Comment on things

An annotation thing is the interpretive part of a UML model.

Relationships between things in UML model elements

1. Relationship

An association relationship connects elements and link instances, represented by solid lines connecting two model elements. Roles and multiplicity markers for both sides of the association can be labeled at both ends of the association.

2. Dependency

Dependency describes the attachment of one element to another. Dependency relationships are represented by dashed arrows pointing from the source model to the target model.

3. Generalization relation

Generalization relationships, also known as inheritance relationships, are represented by a solid line with a hollow triangular arrow pointing from the child to the parent.

4. Realize the relationship

An implementation relationship describes how one element implements another element.

5. Aggregate relationship

Aggregation relations describe the relationship between parts and whole elements, that is, a model element representing the whole may be composed of several model elements representing parts.

About "UML model element is what" this article is shared here, hope the above content can have some help to everyone, so that you can learn more knowledge, if you think the article is good, please share it to let more people 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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report