1 notes content copyright © 2004 ian sommerville. nu-specific content copyright © 2004 m. e....

24
Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software Engineering Lecture # 8 – 2004-09-17 M. E. Kabay, PhD, CISSP Assoc. Prof. Information Assurance Division of Business & Management, Norwich University mailto:[email protected] V: 802.479.7937

Upload: nathan-sinclair

Post on 26-Mar-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

System Models

IS301 – Software EngineeringLecture # 8 – 2004-09-17

M. E. Kabay, PhD, CISSPAssoc. Prof. Information Assurance

Division of Business & Management, Norwich University

mailto:[email protected] V: 802.479.7937

Page 2: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

2 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

Objectives

To explain why the context of a system should be modelled as part of the RE process

To describe behavioral modeling, data modeling and object modeling

To introduce some of the notations used in the Unified Modeling Language (UML)

To show how CASE workbenches support system modeling

Page 3: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

3 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

Topics covered

Context modelsBehavioral modelsData modelsObject modelsCASE workbenches

We will be using 21 of Prof. Sommerville’s slides today

Page 4: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

4 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

System modeling

System modeling helps the analyst to understand the functionality of the system and models are used to communicate with customers.

Different models present the system from different perspectivesExternal perspective showing the system’s

context or environment;Behavioral perspective showing the

behavior of the system;Structural perspective showing the system

or data architecture.

Page 5: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

5 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

Model types

Data processing model showing how the data is processed at different stages.

Composition model showing how entities are composed of other entities.

Architectural model showing principal sub-systems.

Classification model showing how entities have common characteristics.

Stimulus/response model showing the system’s reaction to events.

Page 6: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

6 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

Context models

Context models are used to illustrate the operational context of a system - they show what lies outside the system boundaries.

Social and organizational concerns may affect the decision on where to position system boundaries.

Architectural models show the system and its relationship with other systems.

Page 7: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

7 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

The context of an ATM system

Auto-tellersystem

Securitysystem

Maintenancesystem

Accountdatabase

Usagedatabase

Branchaccounting

system

Branchcountersystem

Page 8: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

8 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

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.

Page 9: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

9 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

Equipment procurement process

Get costestima tes

Acceptdelivery ofequipment

Checkdelivered

items

Validatespecification

Specifyequipmentrequired

Choosesupplier

Placeequipment

order

Installequipment

Findsuppliers

Supplierdatabase

Acceptdelivered

equipment

Equipmentdatabase

Equipmentspec.

Checkedspec.

Deliverynote

Deliverynote

Ordernotification

Installationinstructions

Instal lationacceptance

Equipmentdetails

Check ed andsigned or der f orm

Orderdetails plusblank or der

form

Spec. +supplier +estima te

Supplier listEquipment

spec.

Equipmentdatabase

Equipmentdatabase

Equipment details

Page 10: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

10 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

Behavioral models

Behavioral models are used to describe the overall behavior of a system.

Two types of behavioral 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.

These models show different perspectives so both of them are required to describe the system’s behavior.

Page 11: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

11 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

Data-processing models

Data flow diagrams (DFDs) may be used to model the system’s data processing.

These show the processing steps as data flows through a system.

DFDs are an intrinsic part of many analysis methods.

Simple and intuitive notation that customers can understand.

Show end-to-end processing of data.

Page 12: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

12 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

Order processing DFD

Completeorder f orm

Orderdetails +

blankorder f orm

Validateorder

Recordorder

Send tosupplier

Adjustavailablebudget

Budgetfile

Ordersfile

Completedorder form

Signedorder f orm

Signedorder form

Checked andsigned or der

+ ordernotification

Orderamount

+ accountdetails

Signedorder f orm

Orderdetails

Page 13: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

13 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

Data flow diagrams

DFDs model the system from a functional perspective.

Tracking and documenting how the data associated with a process is helpful to develop an overall understanding of the system.

Data flow diagrams may also be used in showing the data exchange between a system and other systems in its environment.

Page 14: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

14 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

Insulin pump DFD

Insulinrequir ementcomputa tion

Blood sugaranalysis

Blood sugarsensor

Insulindelivery

controller

Insulinpump

Blood

Bloodparameters

Blood sugarlevel

Insulin

Pump contr olcommands Insulin

requirement

Page 15: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

15 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

State machine models

These model the behavior of the system in response to external and internal events.

They show the system’s responses to stimuli so are often used for modeling real-time systems.

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.

Page 16: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

16 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

Statecharts

Allow the decomposition of a model into sub-models (see following slide).

A brief description of the actions is included following the ‘do’ in each state.

Can be complemented by tables describing the states and the stimuli.

Page 17: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

17 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

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

Page 18: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

18 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

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 ‘Half power’.

Full power The oven power is set to 600 watts. The display shows ‘Full power’.

Set time The cooking time is set to the user’s input value. The display shows the cooking time selected and is updated as the time is set.

Disabled Oven operation is disabled for safety. Interior oven light is on. Display shows ‘Not ready’.

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. On completion of cooking, the buzzer is sounded for 5 seconds. Oven light is on. Display shows ‘Cooking complete’ while buzzer is sounding.

Page 19: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

19 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

Microwave oven stimuli

Stimulus DescriptionHalf power The user has pressed the half power

buttonFull power The user has pressed the full power

buttonTimer The user has pressed one of the timer

buttonsNumber The user has pressed a numeric key

Door open The oven door switch is not closed

Door closed The oven door switch is closed

Start The user has pressed the start button

Cancel The user has pressed the cancel button

Page 20: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

20 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

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

Page 21: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

23 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

Data dictionaries

Data dictionaries are lists of all of the names used in the system models. Descriptions of the entities, relationships and attributes are also included.

AdvantagesSupport name management and avoid

duplication;Store of organizational knowledge linking

analysis, design and implementation;Many CASE workbenches support data

dictionaries.

Page 22: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

24 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

Data dictionary entries

Page 23: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

44 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

Homework

RequiredBy Friday 24 Sep 2004Submit written responses with computer-

based diagrams for the following questions

8.1 – 8.3 (@10)8.4 (30)

OptionalBy Friday 1 Oct 2004Any or all of the following @5 points

8.6 – 8.9

Page 24: 1 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved. System Models IS301 – Software

45 Notes content copyright © 2004 Ian Sommerville. NU-specific content copyright © 2004 M. E. Kabay. All rights reserved.

DISCUSSION