IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide1
Objectives
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide2
Topics covered
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide3
Object-oriented development
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide4
Characteristics of OOD
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide5
o1:
o3:
o4
C
state
sta
st
ops1
ops
op
o5
o2:
o6:
C
st
state
sta
op
ops3
ops
Interacting objects
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide6
Advantages of OOD
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide7
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide8
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide9
Several different notations for describing objectoriented designs were proposed in the 1980s and
1990s.
The Unified Modeling Language is an integration of
these notations.
It describes notations for a number of different
models that may be produced during OO analysis
and design.
It is now a de facto standard for OO modelling.
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide10
Emp
y
e
e
nam
addr
date
th:
D
emp
socia
depa
tme
man
salar
y:
in
statu
taxC
.join
.
leav
retire
chan
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide11
Object communication
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide12
Message examples
// Call a method associated with a buffer
// object that returns the next value
// in the buffer
v = circularBuffer.Get () ;
// Call the method associated with a
// thermostat object that sets the
// temperature to be maintained
thermostat.setTemp (20) ;
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide13
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide14
Emp
y
e
e
Mana
g
e
r
Pr
og
ram
pro
budge
dateA
Pr
oject
Dept
Stra
ic
Mana
g
e
r
Mana
g
e
Man
g
e
r
r
projec
dept
resp
A generalisation hierarchy
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide15
Advantages of inheritance
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide16
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide17
UML associations
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide18
Emp
De
tm
is-m
is-m
ma
Ma
An association model
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide19
Concurrent objects
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide20
Servers.
Active objects
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide21
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide22
c1 = sat1.position () ;
c2 = sat2.position () ;
currentPosition = theNavigator.compute (c1, c2) ;
}
} //Transponder
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide23
Java threads
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide24
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide25
Process stages
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide26
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide27
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide28
Dat
con
sub
pres
Data
read
Dat
sub
are
Data
for
Dat
subs
are
Data
inte
rati
Dat
sub
are
Data
from
Layered architecture
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide29
subs
su
Data
c
Da
Obser
Sate
Us
M
int
fac
d
i
Comm
M
W
e
athe
Ma
p
r
statio
Ballo
su
subs
Dat
Data
p
Da
Data
Data
sto
check
integ
ratio
Ma
Da
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide30
Use-case models
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide31
Sta
tup
Shu
Re
t
Ca
T
est
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide32
Use-case description
System
Usecase
Actors
Data
Stimulus
Response
Comments
Weatherstation
Report
Weatherdatacollectionsystem,Weatherstation
Theweatherstationsendsasummaryoftheweatherdatathathasbeen
collectedfromtheinstrumentsinthecollectionperiodtotheweatherdata
collectionsystem.Thedatasentarethemaximumminimumandaverage
groundandairtemperatures,themaximum,minimumandaverageair
pressures,themaximum,minimumandaveragewindspeeds,thetotal
rainfallandthewinddirectionassampledat5minuteintervals.
Theweatherdatacollectionsystemestablishesamodemlinkwiththe
weatherstationandrequeststransmissionofthedata.
Thesummariseddataissenttotheweatherdatacollectionsystem
Weatherstationsareusuallyaskedtoreportonceperhourbutthis
frequencymaydifferfromonestationtotheotherandmaybemodifiedin
future.
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide33
Architectural design
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide34
W
esub
athe
Ma
ex
Inter
face
co
Co
sub
su
Data
we
P
a
c
sub
ins
Instr
da
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide35
Object identification
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide36
Approaches to identification
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide37
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide38
Weather station
Weather data
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide39
W
e
at
W
e
athe
identi
airT
emp
atu
g
r
em
atu
oun
repor
tW
eathe
win
calibra
test
()
pres
star
tup
(in
rain
all
shutd
colle
sum
Ba
om
er
Ane
er
Gr
ound
therm
er
pre
wind
te
ature
mpe
hei
st
()
tes
t
e
st
calibr
atecal
()(
ate
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide40
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide41
Design models
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide42
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide43
Subsystem models
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide44
subsy
sub
Inter
face
Data
Comm
W
e
ath
Instr
Stat
W
e
athe
subsy
Instrum
Air
RainG
Ane
therm
Groun
Baro
W
iane
ndV
therm
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide45
Sequence models
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide46
:Com
:W
eat
:W
ea
reque
t)
ackno
repo
t sum
()
send
t)
reply
t)
ackno
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide47
Statecharts
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide48
Oper
calib
Ca
ca
test
star
tup
()
T
e
s
W
a
itin
Shutdo
tran
te
shutdo
T
r
an
colle
clock
done
rep
tW
eat
we
co
Sum
Colle
Weather station state diagram
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide49
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide50
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide51
Design evolution
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide52
Changes required
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide53
W
e
athe
Air
identi
NOD
repor
tW
eathe
smo
eDa
tAirQ
ben
ene
calibr
test
()
coll
star
tup
(i
sum
shutd
P
o
lluti
NOm
Smo
Benz
Pollution monitoring
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide54
Key points
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide55
Key points
IanSommerville2004
SoftwareEngineering,7thedition.Chapter14Slide56