UML static view-class diagram, object diagram, package diagram, and uml package diagram

Source: Internet
Author: User

UML static view-class diagram, object diagram, package diagram, and uml package diagram

The most important thing to draw a class chart is to abstract the class and first recall the basic content of the class.

I. Category

1. Concepts of classes:

A class is a basic concept in Object-Oriented Programming. A class is a set of objects with the same attributes, methods, semantics, and relationships.

2. Category:

Entity class: stores the information to be stored permanently.

Border class: located at the junction of the system and the outside world. Including all forms, reports, printers, and other hardware interfaces and interfaces with other systems.

Control: coordinates other tasks. Generally, each use case has a control class.

3. Class expression:

Ii. Category chart

Class diagrams are the most commonly used diagrams. Class Diagrams help us understand the system architecture more intuitively. class diagrams describe the system design part in a graphical manner.

A class chart can be fully understood from its composition, visibility, scope, abstract class, diversity, attributes, and operations.

Steps for drawing a class chart:

(1) Abstract The Class

(2) determine the attributes and methods of the class. Find the executor of the method to determine the method.

(3) determine the relationship between classes

Usage of class charts:

(1) vocabulary modeling of the system

(2) Simple Collaborative Modeling

(3) Modeling the logical database mode

3. Package Diagram

A package diagram is used to describe the hierarchical structure given by the system. It forms the relationship between the package and the package. It is an important modeling tool for maintaining and controlling the overall structure of the system.

The role of the package: -- logically modularize a complex Graph

-- Organize source code

Package elements: Class, interface, component, use case, and other packages

If the package is unwrapped, the elements in the package are also removed.

Relationship between packages: generalization, refinement, and dependency (commonly used)

FAQs:

Avoid circular dependency generation

The unit of test can be set to package.

Try to include elements with similar concepts and semantics in the same package.

If the package is unwrapped, the elements in the package are also removed.

For a package, find out the elements in the package that are accessed outside the package, mark these elements as public, and all other elements as protected or private.

Iv. object graph

An object graph shows a group of objects and their relationships at a certain time point. It can be seen as an instance of a class graph at a certain time point in the system.

Included elements: objects, connections, packages

V. Summary

These are the accumulation of the previous video, and then contact us for practical experience!

 

 

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.