Professional Documents
Culture Documents
Lec 03 - OOSE - Modelling With UML
Lec 03 - OOSE - Modelling With UML
Introduction
2
What is Modeling?
Model 2
View 2
View 1
System
View 3
Model 1
Electrical
Wiring
Scale Model
Airplane: System
Phenomenon
An object in the world of a domain as you perceive it
Example: The lecture you are attending
Example: My wrist watch
Concept
Describes the properties of phenomena that are common.
Example: Lectures on software engineering
Example: wrist watches
Concept is a 3-tuple:
Name (To distinguish it from other concepts)
Purpose (Properties that determine if a phenomenon is a member of a concept)
Members (The set of phenomena which are part of the concept)
Abstraction
Classification of phenomena into concepts
Modeling
Development of abstractions to answer specific questions about a set of
phenomena while ignoring irrelevant details.
Modelling with UML February 2019
12 Concepts in Software: Type and Instance
Type:
An abstraction in the context of programming languages
Name: int, Purpose: integral number, Members: 0, -1, 1, 2, -2, . . .
Instance:
Member of a specific type
The type of a variable represents all possible instances the variable can take
The following relationships are similar:
“type” <–> “instance”
“concept” <–> “phenomenon”
TrafficController FlightPlanDatabase
Aircraft
Reference: “The Unified Modeling Language User Guide”, Addison Wesley, 1999.
Supported by several CASE tools
Rational ROSE
TogetherJ
Actor
ReadTime
SetTime
WatchUser WatchRepairPerson
ChangeBattery
pressButton1() blinkHours()
pressButton1() blinkMinutes()
Activation
Lifeline
20 Class Diagrams
Association
Class
Multiplicity Watch
1 1 1 1
2 1 2 1
PushButton LCDDisplay Battery Time
state blinkIdx load now
push() blinkSeconds()
release() blinkMinutes()
blinkHours()
stopBlinking()
referesh()
Attribute
Operations
[button1Pressed]
Transition
[button1&2Pressed] [button2Pressed]
BlinkMinutes IncrementMin.
[button1Pressed]
[button1&2Pressed] [button2Pressed]
BlinkSeconds IncrementSec.
StopBlinking
Final state
Modelling with UML February 2019
Represent behavior as states and transitions