Uml and other diagrams, Uml

Source: Internet
Author: User

Uml and other diagrams, Uml

In object-oriented processing, class graphs are at the core and provide the main rules for defining and using objects. It is a diagram describing classes, interfaces, and their relationships. It shows the static structure of each class in the system and is a static model.

I. Class Diagram

1. Class

A class is the basis for creating a class chart. It defines a group of objects with statuses and behaviors. These objects have the same attributes, operations, relationships, and semantics. The UML specification uses an icon with three predefined columns to represent the class, including the name, attribute, and operation.


The icons before stuID, getOn, and getOff indicate the Public type, and can also be expressed as "+, attributes and Operations declared for this statement can be viewed, used, and updated outside the class where it is located. The icon before stuName indicates the Protected type, which can be expressed, properties and operations can be accessed by other methods of lei, or by methods of the corresponding inherited classes. stuSex is a Private type and can be expressed as "-". This type is the most restrictive, it can only be used by the current class.


2. Relationship

Association: defines the relationship rules between objects. When an application creates and uses a relationship, Association provides rules to maintain the integrity of the relationship.

(1) aggregation: indicates the relationship between the whole and the part. The partial category can exist without the whole class.

(2) combination: indicates the relationship between the whole and the part. The partial category must exist in the whole class.

Generalization: generalization and inheritance are used to describe the type of a class that is another class. Describes the relationship between a general transaction and a special class of the transaction.

Dependency: A usage relationship. The change in specification of one thing may affect the use of another thing.

Implementation: it is the semantic relationship between class elements. In this relationship, one class element describes the contract implemented by another class element.


Ii. VS VB

In vb, we often use Public and Private when defining event methods, which is also useful in the course of class learning.

In VB, Public indicates Public, which is a global variable and can be applied to any form or module. Private is only used for the current form or module. However, in a class, we often define the visibility of attributes and operations, which is also needed, but slightly different. Attributes and Operations declared as Public can be viewed, used, and updated outside the class. Declared as Private visibility is the most restrictive and only used in declared classes. Another method is declared as Protected, which can be accessed by other methods of the class, it can also be accessed by the methods declared by the corresponding inheritance class.


Iii. Summary

A class chart is the core graph of nine types of graphs. Basically, other graphs are associated with this graph. Although this is a new kind of knowledge we have come into contact with, it is also a graphical form of things we see in our daily lives, A class chart is just a synonym for transaction graphics. After our hard work, you will find that this is just a trick. Therefore, do not be afraid to learn new knowledge and never forget old knowledge.


Next, we will analyze the graph-like method.


Uml behavior diagram type

In UML 2, there are two basic graph categories: structure diagram and behavior diagram. Each UML diagram belongs to the two diagrams. The purpose of the structure diagram is to display the static structure of the modeling system. They include classes, components, and (or) object graphs. On the other hand, the behavior chart shows the dynamic behavior of objects in the system, including object methods, collaboration, and activities. An instance of a behavior diagram is an activity diagram, with an example diagram and a sequence diagram.

UML diagram required for Software Design

Object-oriented Program
1. Requirement Analysis
2. Overall Design
3. Detailed design phase
4. Implementation Phase
I. Demand analysis stage:
Use Case chart as the main graph until the class analysis graph. Class diagrams are the source code. The main functions of the use case are shown in a sequence diagram. The status of the use case can be identified by a status chart. Note that the activity chart should be refined to the same degree as the sequence chart. Draw different use case diagrams based on different users. Draw a deployment diagram based on different physical locations; classify programs based on different types of users to obtain a component diagram. Obtain the collaboration diagram from the sequence diagram and perform simple Class Analysis to obtain the Class Analysis diagram.
The message in the sequence diagram is changed to an operation, and the information in the message is changed to an attribute.
Ii. Overall Design
Displays what you see on the system computer level, including the interface.
The Complete Sequence diagram of each use case, including the master function, backup function, exception event, error input and error handling series gallery. Each branch has a sequence diagram. Merge all the sequence diagrams with an activity diagram, and use a diamond box to obtain the complete functions of the use case. Refine the use case diagram, compare the activity diagram of each use case, get the same part, and break it into use cases. For Use Cases with complex functions, break it into multiple include use cases. Modular expansion of some functions is called an extension case. Users and use cases can be inherited.
Obtain the collaboration diagram from the sequence diagram for simple class analysis, especially the entity class. Added class: interface class and transaction management class.
Draw a system status chart (with an active expression), draw a class status chart for important classes, and obtain new attributes and operations.
Redraw a sequence diagram, activity diagram, and collaboration diagram for the added classes. Analysis class diagram.
Refine the status chart.
The state chart is the main, and the application class diagram is the center of gravity. It draws a detailed use case diagram for all users, indicating the interface with other systems.
Draw the overall system design diagram, and draw the diagram based on the Application class diagram and the sequence activity diagram. Create the overall UML model.
Iii. Detailed Design Stage
Detailed internal structure and implementation scheme of the program
Class charts focus on adding control classes.
Obtain the program structure from the class diagram, and obtain the program process (C ++) from the sequence activity diagram ).
Redraw a sequence diagram, collaboration diagram, and activity diagram with control class.
. Use a collaboration diagram to function the operation, and use the return value to variable the attribute.
. Provides the activity expression of the class status chart. A status chart event is a message of a sequence chart, a class operation, an activity expression is the implementation of a conversion event, and thus the implementation of a class operation.
Break down the activity diagram based on a specific operation. Different from the activity expression.
Converts an application class diagram Into a design class diagram in a specific language,
Subsystem Division: class diagram, activity diagram (module diagram), component diagram, and deployment diagram.
Add the class align to the component and add the component to the deployment diagram.
Create a complete program design model.
IV. Implementation stage
Create a concurrency view.
Component diagram: executable file and configuration file.
Deployment diagram: process, set hardware, such as a printer
Software Testing
Product stage

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.