Академический Документы
Профессиональный Документы
Культура Документы
Lecture 7
ELH71413
Be able to explain what UML is, where it came from and where its going. Be familiar with each of the Nine UML Diagrams Be familiar with UML packages and stereotypes Appreciate how UML diagrams may be used together to construct multiple views of a system.
Topic 1
Student
2
This material is based on OOSE, Owen, University of Leeds, 2002.
ELH71413
What is a Diagram?
Definition: Abstract shapes are used to represent things or actions from the real world.
40
Diagrams follow rules and standards The standards make sure that different people will interpret the diagram in the same way
3
Source: OO Analysis and Design with UML, Bennett, McRobb and Farmer, 2002.
ELH71413
On their own Diagrams provide a convenient abstraction to clarify ones own understanding to show to others for discussion, debate and clarification to provide high level documentation Diagrams are used to communicate information to people. Diagrams should therefore be clear, simple, unambiguous. - i.e. They should follow rules! UML defines a Language, i.e. the rules, for drawing diagrams of computer systems to avoid ambiguity between developers. UML rules include the flexibility to keep diagrams clear and simple by showing only what needs to be shown.
4
ELH71413
Introduction to UML
UML - Unified Modelling Language - Unified
- Modelling
- Language - The UML is a set of different diagram types that can be used alone or together to describe all or part of a system. -Each diagram type can be used to describe a system - from a particular perspective
ELH71413
U M Language
Item
Item prepared for shipping
Ship via
ELH71413
U M Language
Together We can use a set of diagrams to describe different aspects of a system. at different levels of abstraction to examine specific aspects in detail for different perspectives on the same system to model the views of a system in terms of Requirement Logical Dynamic and 7 Physical views
ELH71413
Ant
- currentPosition_X: Integer - currentPosition_Y: Integer - direction: Integer - speed: Integer - haveFood: Boolean - knownFoodPosition_X: Integer
- knownFoodPosition_Y: Integer
Key Point Users of UML should work at a level of abstraction appropriate to what they are trying to communicate.
ELH71413
U M Language
Revise Draft
Review Chapter
[satisfied]
[book complete]
Add Exercises
Typeset Book
Reset Book
Print Book
9 Source: OO Analysis and Design with UML, Bennett, McRobb and Farmer, 2002.
Domain Model: The RUP - Where it came from and where its going.
Software Engineering
ELH71413
Based on a
Development method
Microsoft
is a member of..
SSADM
RAD
Key to UML
Is related to Is a type of Organisations are stereotyped with blue class boxes.
bought by...
IBM
is a member of..
ELH71413
History of UML
1995 Booch Method
Rumbaughs OMT
Other Methods
UML 1.1 UML 1.3 UML 1.4 UML 1.5 UML 2.0 11
ELH71413
Its a set of diagrams with notation rules. Diagrams can be used in problem solving. UML is controlled by an independent standards body - the Object Management Group (OMG) - www.omg.org UML is now firmly established as the de facto world standard. UML has it historical roots in OO Systems Development BUT... as a world standard for diagram notation its potentially valuable to any systems development effort any problem solving effort where drawing diagrams helps For an early history of UML read Chris Korbyns paper UML 2001: A Standardization Odyssey (1999)
12 www.omg.org/attachments/pdf/UML_2001_CACM_Oct99_p29-Kobryn.pdf
ELH71413
13
ELH71413
Use Case
Deployment
Class
Component
Object Collaboration
Activity State
Sequence
Sales Manager
These diagrams show the users and what functions the system must provide for them. The functions are described as transactions of value.
14
ELH71413
Use Case
Class Diagrams
Venue
Deployment
Class
Component
Object Collaboration
Activity State
Sequence
Stock Items
Room
Customer Contact
Corporate Customer
Internal Customer
Class diagrams present the static (logical) structure of the system. They are the core of the UML notation and of an object-oriented 15 design.
ELH71413
Use Case
Object Diagrams
An Example of an Object Diagram
Bobs Work PC :Computer name = Dell 466 memory = 64
Bob :Author Name = Bob J. Age = 32
Deployment
Class
Component
Object Collaboration
Activity State
Sequence
Basically the same as a Class diagram but showing single Object Instances and their relationships rather than Classes. Used to describe the Objects in a Scenario.
16
ELH71413
Use Case
Collaboration Diagrams
1. Add Customer()
Deployment
Class
Component
Object Collaboration
Activity State
Sequence
2. Add Contact()
:Customer
3. Confirm Details()
:Customer Contact
Sales Coordinator
Note that these are Object Diagrams with added message arrows to show the messages. These diagrams show the sequence of message sent between collaborating objects for a particular task or scenario. The diagrams highlight the relationships between the collaborating objects.
17
ELH71413
Use Case
Sequence Diagrams
Sales Coordinator
Deployment
Class
Component
Object Collaboration
Activity State
Sequence
:Customer
:Customer Contact
Confirm Details()
These diagrams show the sequence of message sent between collaborating objects for a particular task or scenario. They highlight the flow of control between the objects.
18
ELH71413
:Customer
3. Confirm Details()
:Customer Contact
:Customer
:Customer Contact
Confirm Details()
19
ELH71413
Use Case
State Diagrams
Provisional
[Deposit received] [Cancelled]
Deployment
Class
Component
Object Collaboration
Activity State
Sequence
Confirmed
Cancelled
A Statechart, (or state, or state transition diagram) illustrates the states an object can be in and the transitions which move the object between these states. Guard Conditions using [square brackets] determine which transitions are possible.
Complete
Invoiced
20
ELH71413
Use Case
Activity Diagrams
Check availability
Deployment
Class
Component
Object Collaboration
Activity State
Sequence
Pay Deposit
Cancel?
[No]
Attend Event
[Yes]
Pay Balance
They are basically just flow charts! They have - decision points - synchronisation bars The synchronisation bars show activities that can happen in either order or even at the same time.
21
ELH71413
state
Add a New Client Assign Staff Contact [no campaign to add]
black circle
Decision points
diamond
Guard conditions
[campaign to add]
in square brackets
Final state
22
ELH71413
Use Case
Component Diagrams
Salesperson Diary & Contacts Customer Database
Deployment
Class
Component
Object Collaboration
Activity State
Sequence
Events System
Component diagrams illustrate the physical structure of the system in terms of its Software. They show the software components and the dependencies between them.
23
ELH71413
Use Case
Deployment Diagrams
Deployment
Class
Component
Object Collaboration
Activity State
Sequence
:Salespersons PC
:Booking Server
<<LAN>>
Deployment diagrams illustrate the physical architecture of the system in terms of the Hardware it is deployed on and the communication links between hardware nodes.
24
ELH71413
:Salespersons PC
Salespers on Diary & Contacts Event Booking User Interface
:Booking Server
Customer Database
<<LAN>>
Events System
25
ELH71413
Package
Packages
A Package is a UML container which can contain one or more similar entities Objects, Classes, Components, Diagrams and other Packages Packages provide a way of organising large scale models
26
ELH71413
Stereotyping
UML includes a feature called stereotypes which enable users to create their own UML symbols. A stereotype can be drawn using guillemets, e.g. << TCP/IP >> OR a Picture can be used instead:
Deployment Diagram: A two PC Network
<< TCP/ IP >>
Key Point - This picture is a valid UML diagram provided that TCP/IP has been declared as a stereotype for a deployment diagram communication association and that the picture of the PC has been declared as a stereotype for a Network PC Deployment node.
27