The Unified Modeling Language

更新时间:2023-05-27 08:07:01 阅读量: 实用文档 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

The Unified Modeling Language

The Unified Modeling Language

Diagrams Methodology

1

MotivationWhy a unified notation? Expressiveness Completeness Consistency

2

The Unified Modeling Language

The Value of the UMLIt is an open standard It supports the entire software development lifecycle It supports diverse application areas It is based on experience and needs of the user community It is supported by many tools

3

Creating UMLUML 2.0

UML 1.4industrialization

UML 1.3revision OMG Acceptance, Nov 1997Final submission to OMG, Sep‘97 First submission to OMG, Jan´97

UML 1.1standardization

UML partners

UML 1.0 UML 0.9Unified Method 0.8

Web - June´96 OOPSLA´95

Other methods

Booch OOAD

OMT

OOSE

4

The Unified Modeling Language

Contributions to UMLMeyer Before and after conditions Booch OOA&D Rumbaugh OMT Jacobson OOSE Shlaer - Mellor Object lifecycles Odell Classification5

Harel Statecharts

Gamma, et al Frameworks and patterns, HP Fusion Operation descriptions and message numbering Embley Singleton classes and high-level view Wirfs-Brock Responsibilities

Motivation (cont.)Why a multi-diagrammatic notation? Focus Multiple aspects of a complex system Complexity Need for detailed analysis and design

6

The Unified Modeling Language

UML Models, Views and DiagramsA diagram is a view into a model Presented from the aspect of a particular stakeholder Provides a partial representation of the system Is semantically consistent with other views

7

Architectural viewAn architectural view is a simplified description (an abstraction) of a system From a particular perspective Covering particular concerns, and Omitting entities that are not relevant to this perspective

8

The Unified Modeling Language

The Architect’s VisionLogical ViewEnd-user Functionality

Implementation View Use Case ViewProgrammers Software management

System integrators Performance Scalability Throughput

Process View

Deployment View

System engineering System topology Delivery, installation Communication

ConceptualP. Kruchten, Nov. 1995 The 4+1 View Model of Architecture IEEE Software

Physical9

How many Views?Views should to fit the context Not all systems require all views Single processor: drop deployment view Single process: drop process view Very small program: drop implementation view A system might need additional views Data view, security view,…

10

The Unified Modeling Language

Models, Views, and DiagramsStatic viewsUse Case Diagrams Class Diagrams Object Diagrams

Sequence Diagrams

Collaboration Diagrams

Models

Component Diagrams

Statechart Diagrams

Activity Diagrams

Deployment Diagrams

Dynamic views

11

Main Diagrams (Overview)Structure Class diagram Object diagram Interactions Sequence diagram Collaboration diagram Dynamic aspects State diagram Physical aspects Component diagram Deployment diagram12

The Unified Modeling Language

Some ReferencesFowler, M., Scott, K.,“UML distilled Second Edition– a brief guide to the standard object modeling language”, Addison-Wesley, 2000 Stevens P., Pooley, R.,“Using UML– Software Engineering with Objects and Components”, AddisonWesley, 2001 (Updated Edition to

UML 1.4) The Object Management Group UML Web page, online at /uml OMG,“OMG Unified Modeling Language Specification”, Version 1.4, Sep. 2001, on-line at /uml Jacobson, I., Booch, G., Rumbaugh, J.,“The Unified Software Development Process”, Addison-Wesley, 1999.…13

Classes and Class InstancesBuilding block shared by all OO views is the granule of module representation (class and class instances). Example How to model a system able to open new Faculties (having a name and an athenaeum) and managing enrolment of new students (having a name and ID)?

14

The Unified Modeling Language

Classes and Class InstancesStudent ID Name 1..n matriculate() enrol 1 open() Faculty Name Athenaeum

Class level Instance level… Albert Einstein… Galileo Galilei… Martin L. King

association

X X X

Engineering Architecture Computer Science Economics association instances (or links) Arts15

Where Diagrams belongStructure Class diagram Object diagram Interactions Sequence diagram Collaboration diagram Dynamic aspects State diagram Physical aspects Component diagram Deployment diagram

Class level Class diagram

Instance level Object diagram

Sequence diagram Collaboration diagram State diagram Component diagram Deployment diagram16

The Unified Modeling Language

Class diagrams

Type level

17

What is a Class DiagramA Class Diagram describes The types of objects in the system The types of static relationships among them We draw Class Diagrams under three perspectives Conceptual Software independent Language independent Specification Focus on the interfaces of the software Implementation Focus on the implementation of the software18

The Unified Modeling Language

Summary of Class DiagramsClass * links links instance of Object *

Association

instance of

Link *

*

Class Diagram

Object Diagram

19

Object Diagrams

Instance level Example Scenarios

20

The Unified Modeling Language

Object DiagramsAn object diagram shows instances and links among them An object diagram is a snapshot of the objects in a system At a point in time With a selected focus Interactions– Sequence diagram Message passing– Collaboration diagram Operation– Deployment diagram…21

An Object…ID label: Class Name M1: Menu window visible=true position=(10,23) size=160 Attribute values

22

The Unified Modeling Language

Objects and links

23

Interactions between objectsAn objects interacts with another objects by sending a message, i.e. a request to execute an operation+ possible parameters Receiving the message caused to select and execute the method Basic rule Delegate to other objects the operations they are able to carry out Results Good decoupling among objects Simplicity Reusability24

The Unified Modeling Language

Example: registration for an examD1:ExameDate Jan: Examprint print

date subject studentsList 1: Studentprint

print

day month year time

Name N-1:Student Surname N Student Name Code Name Surname Surname Code Code

SoftEng: Lesson name code

25

本文来源:https://www.bwwdw.com/article/izb4.html

Top