22. Use a UML diagram to describe

Source: Internet
Author: User
: This article mainly describes how to use UML diagrams. For more information about PHP tutorials, see. The class name is usually in italics. When an abstract class is used, the class name is marked with {abstract} in the next line. When an interface is used, the class name is used above the interface name. < >.


Use attribute: visibility symbol property name: Type = property value

Visibility tag:

+

Public

All code visible

-

Private

Only the current class can access

#

Protected

Only the current class and its subclass can access

Use case:

Class method:

Accessible method name (parameter 1, parameter 2 ......) : Returned data type

Use case:


Inheritance and implementation

Description of the inheritance relationship


Description interface implementation


Association

When a class property stores an instance of another class, we call it Association.

A straight line is used when the correlation is uncertain.


Only when TECHER contains PUPLL instances


Association between TECHER and PUPLL


Indicates the number of associated times.


Aggregation and combination

Aggregation and combination are both referenced object instances and become part of the referenced object.

Aggregation: the contained objects are the core part of the container, but they can also be included by other objects at the same time, using a hollow diamond. The container may not be deleted.

Combination: the contained object can only be referenced by its container, using a solid diamond. The container must be deleted.


Description

The used class is passed as a parameter of another class method, and the arrow points to the used


Annotations

Easy to understand and use the Product class to output data


The above section describes the use of UML diagrams, including the content, and hope to help those who are interested in PHP tutorials.

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.