Upload
nathaniel-waller
View
30
Download
3
Tags:
Embed Size (px)
DESCRIPTION
SWE 205 - Introduction to Software Engineering. Lecture 12 – System Modeling. Lecture Objectives. To explain why the context of a system should be modelled as part of the RE process To describe behavioural modelling, data modelling and state machine models. System modelling. - PowerPoint PPT Presentation
Citation preview
1
SWE 205 - Introduction to Software Engineering
Lecture 12 – System Modeling
2
Lecture Objectives To explain why the context of a system
should be modelled as part of the RE process
To describe behavioural modelling, data modelling and state machine models
3
System modelling System modelling helps the analyst to
understand the functionality of the system and models are used to communicate with customers.
4
System modelling Different models present the system
from different perspectives External perspective showing the system’s
context or environment; Behavioural perspective showing the
behaviour of the system; Structural perspective showing the system
or data architecture.
5
Context models Context models are used to illustrate
the operational context of a system - they show what lies outside the system boundaries.
Developing a simple architectural model is the first step. Architectural models show the system and
its relationship with other systems.
6
The context of an ATM system
Auto-tellersystem
Securitysystem
Maintenancesystem
Accountdatabase
Usagedatabase
Branchaccounting
system
Branchcountersystem
Architecture models do not show the relationshipBetween the other systems in the envirnoment.
7
Process models Process models show the overall
process and the processes that are supported by the system.
Data flow models may be used to show the processes and the flow of information from one process to another.
8
Equipment procurement process
Get costestimates
Acceptdelivery ofequipment
Checkdelivered
items
Validatespecification
Specifyequipmentrequired
Choosesupplier
Placeequipment
order
Installequipment
Findsuppliers
Supplierdatabase
Acceptdelivered
equipment
Equipmentdatabase
Equipmentspec.
Checkedspec.
Deliverynote
Deliverynote
Ordernotification
Installationinstructions
Installationacceptance
Equipmentdetails
Checked andsigned order form
Orderdetails plusblank order
form
Spec. +supplier +estimate
Supplier listEquipment
spec.
9
Behavioural models Behavioural models are used to
describe the overall behaviour of a system.
Two types of behavioural model are: Data processing models that show how
data is processed as it moves through the system;
State machine models that show the systems response to events.
10
Behavioural models These models show different
perspectives so both of them are required to describe the system’s behaviour.
11
Data-processing models Data flow diagrams (DFDs) may be
used to model the system’s data processing.
DFDs show the processing steps as data flows through a system. Simple and intuitive notation that
customers can understand. Show end-to-end processing of data.
12
Order processing DFD
Completeorder form
Orderdetails +
blankorder form
Validateorder
Recordorder
Send tosupplier
Adjustavailablebudget
Budgetfile
Ordersfile
Completedorder form
Signedorder form
Signedorder form
Checked andsigned order
+ ordernotification
Orderamount
+ accountdetails
Signedorder form
Orderdetails
13
Data flow diagrams DFDs model the system from a
functional perspective. Each transformation represents a single
function or process. Tracking and documenting how the data
associated with a process is helpful to develop an overall understanding of the system.
14
Data flow diagrams Data flow diagrams may also be used in
showing the data exchange between a system and other systems in its environment.
15
Insulin pump DFD
Insulinrequirementcomputation
Blood sugaranalysis
Blood sugarsensor
Insulindelivery
controller
Insulinpump
Blood
Bloodparameters
Blood sugarlevel
Insulin
Pump controlcommands Insulin
requirement
16
State machine models These model the behaviour of the system in
response to external and internal events. They show the system’s responses to stimuli
so are often used for modelling real-time systems.
17
State machine models State machine models show system
states as nodes and events as arcs between
these nodes. When an event occurs, the system moves
from one state to another. Statecharts are an integral part of the
UML and are used to represent state machine models.
18
Microwave oven modelFull power
Enabled
do: operateoven
Fullpower
Halfpower
Halfpower
Fullpower
Number
Dooropen
Doorclosed
Doorclosed
Dooropen
Start
do: set power= 600
Half powerdo: set power
= 300
Set time
do: get numberexit: set time
Disabled
Operation
Cancel
Waiting
do: displaytime
Waiting
do: displaytime
do: display 'Ready'
do: display'Waiting'
Timer
Timer
19
Microwave oven state description
State Description
Waiting The oven is waiting for input. The display shows the current time.
Half power The oven power is set to 300 watts. The display shows Hشalf powerص.
Full power The oven power is set to 600 watts. The display shows Fشull powerص.
Set time The cooking time is s et to the userصs input value. The display shows the cooking timeselected and is updated as the time is set.
Disabled Oven operation is disabled for safety. Interior oven light is on. Display shows Nشotreadyص.
Enabled Oven operation is enabled. Interior oven light is off. Display shows شReady to cookص.
Operation Oven in operation. Interior oven light is on. Display shows the timer countdown. Oncompletion of cooking, the buzzer is sounded for 5 s econds. Oven light is on. Displayshows شCooking complete wصhile buzzer is sounding.
20
Microwave oven stimuli
21
Microwave oven operation
Cookdo: run
generator
Done
do: buzzer onfor 5 secs.
Waiting
Alarm
do: displayevent
do: checkstatus
Checking
Turntablefault
Emitterfault
Disabled
OK
Timeout
Time
Door open Cancel
Operation
22
Key Points A model is an abstract system view.
Complementary types of model provide different system information.
Context models show the position of a system in its environment with other systems and processes.
Data flow models may be used to model the data processing in a system.
State machine models model the system’s behaviour in response to internal or external events
23
Announcements Major 1: Today (i.e. Wed November 5,
2008) 8:00 PM – 9:30 PM (Bld 22, room 130)