UML Package Diagram Learning

Source: Internet
Author: User

Package diagrams is a combination of model elements that are represented in UML in a notation similar to a folder, each element in the system can be owned by only one package, one package can be nested in another, and a package diagram can be used to classify the related elements into a system that contains a package, chart, or individual element. In simple terms, we can directly understand the package as a namespace, a folder, is used to organize the packaging of graphics, the package diagram can be used to describe the organizational level of the functional group namespace

So why does the concept of "package" appear? We know that in the perspective of Object-oriented software development, class is obviously the basic building block of the whole system of the component, but for the huge application system, it contains countless classes, coupled with the criss traffic relationship between classes, multiple, and so on, must be much more than we can handle the complexity, so "package" from this. Today we are together to learn about the package map of the relevant knowledge, first of all, we look at the main contents of the package:

With an overall perception of the main content of package diagrams, let's take a look at the description of the package and the subtle relationship between the package and the package:

Let's look at the relationship between the package and the package, first of all, let's look at dependencies, as shown below

Let's take a look at the above illustration, first of all, the dependencies between packages and packages are different from the inheritance of classes that we normally call, the access domain that includes the package cannot be inherited, used in a package to introduce the element of another package output, so a relies on B, package a introduces B method in package B, and the access rights here are public, The method in a is protected. According to the learned knowledge, we know that there is also a generalization between the package and the package, the relationship between the package and the package is embodied in the relationship between class and class, the package can not draw generalization relationship, painting dependent can be. Next picture, let's take a look at the access restrictions for packages:

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.