Online UML Class Diagram Class Diagram Tool

Online Visual Paradigm  - UML Editor

Use online editor to easily draw UML UML diagrams, which includes powerful editing tools UML, UML instant syntax checking and clean user interface. Visual Paradigm line UML diagrams, such as classes, for example, sequence, activity, deployment, assembly state machine, and with the package of FIG. ( A key to open immediate use )

What is the class diagram in UML?

Object-oriented class structure of the system described by FIG relationship between the display in the system and class. Class diagram also shows the properties and constraints of the class.

 

Class diagram notation

class

A UML class is represented by a rectangle containing three compartments vertically stacked, as shown:

FIG example UML class

Attributes

Attribute lists the attributes section of the class for each class on a separate line. Properties section is optional, but it includes for each attribute class used to display a list format. The line uses the following format: name: attribute type (e.g. cardNumber: Integer).

surgery

These operations are recorded in the class of FIG rectangular bottom compartment, which is optional. As with attributes, class of operation displayed in list format, each operation on its own line. Recording operation using this notation: name (parameter list): type of return value (e.g. calculateTax (Country, State): Currency ).

relationship

association

Some objects composed by other objects. Association specifies "There -a" relationship between two classes or "full / partial." In association, the object having the entire class as a class instance of the object data portion.

In the class diagram, the relationship appears to have a solid line.

Unidirectional association - in a one-way association, two classes are related, but only one class knows there is a relationship.

Way is depicted as an association with an open arrow pointing to the known classes of the solid line.

 

Associated bidirectional (standard) - the association is an association between two classes. Always association

Examples of undirected association

It is assumed to be bi-directional; this means that unless you have some other type of association limited to, otherwise it will recognize two classes and their relationships to each other.

Represented by the solid line bidirectional association between two classes.

Examples of bidirectional associations

Multiple

The symbol is placed near the end of the diversity associated. These symbols represent the number of links to another instance of a class instance of a class. For example, a company will have one or more employees, but each employee only for a company job.

Multiple examples

Generalization is a general thing (called the superclass) and a more specific kind of relationship between (called a subclass). Generalization is sometimes called "a" relationship is established through the process of succession.

In the class diagram, presented as a generalization relationship orientation line with a fixed point to the parent class large open arrow.

 

Abstract classes and methods

In the inheritance hierarchy, subclasses implement specific details, but the parent class will define the framework for its subclasses. Parent class also provides a template, the common method for the implementation of its subclasses.

 

Abstract class name is usually displayed in italics; alternatively, may be used to display text annotations abstract classes, the name behind or below may also be referred to as a stereotype {abstract}.

An abstract method is a method not implemented. In order to create an abstract method, create an action and make it italic.

achieve

visibility

Visibility information indicating who can access the class contained in a +, -, -, and # represents, as shown:

Visibilitiy Example (attribute)

 

General

Implementation is the relationship between two things, one thing (an interface) specifies another thing (a class) by performing the operation specified in the contract to ensure the execution of the contract.

In the class diagram, the relationship presented as implemented with a dotted line is directed, and with an open arrow pointing interface.

UML implementation example

rely

Dependency indicates "use" the relationship between the two classes. In the class diagram, the dependency presented as a dotted line.

If type A "using the" class B, then one or more statements are applicable:

  1. Class B type is used as a class A or more methods of local variables.
  2. As Class A Class B type parameters of one or more methods.
  3. Used as a Class B or Class A variety of methods return type.
  4. A method of one or more class method invoking one or more classes of B.

Example UML dependencies

Published 377 original articles · won praise 145 · views 210 000 +

Guess you like

Origin blog.csdn.net/Windgs_YF/article/details/104650838