cs 310 ch8: system models abstract descriptions of systems being analyzed to help the analyst...

18
CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers Models present the system from different perspectives external perspective for the system’s context or environment behavioural perspective showing the behaviour of the system structural perspective showing the system or data architecture

Upload: audra-cain

Post on 28-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

CS 310 Ch8: System models

Abstract descriptions of systems being analyzed to• help the analyst understand the system functionality • communicate with customers

Models present the system from different perspectives• external perspective for the system’s context or environment• behavioural perspective showing the behaviour of the system• structural perspective showing the system or data architecture

Page 2: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

Models

8.1 Context Models (illustrate the system boundaries)• Architectural models show a system and its relationship with other

systems• Process models show the processes that the system supports.

Used to describe a system’s overall behaviour.

8.2 Behavioural models (how a system behaves)• Data flow models (DFD)* show how data moves through the

system

• State machine models show the systems response to events

8.3 Data Models (ER diagrams and data dictionaries)

8.4 Object Models (like C++ classes)

8.5 Structured methods* Very little difference between DFD and process models

Page 3: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

Context model: an ATM system

Auto-tellersystem

Securitysystem

Maintenancesystem

Accountdatabase

Usagedatabase

Branchaccounting

system

Branchcountersystem

This is architectural, it says nothing about how systems interact

the system

Page 4: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

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 +

Blank orderform

Spec. +supplier +estimate

Supplier listEquipment

spec.

Process models needed to describe activities

Page 5: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

8.2.1 Data-flow models

Data flow diagrams (DFDs) show the processing steps as data flows through a system• from a functional perspective • simple and intuitive notation that customers can understand

Similar to process diagrams, with the focus on data flows• tracking and documenting the data associated with a process

helps to develop an overall understanding of the system

Data flow diagrams may also show what data is exchanged with other systems in the environment

Page 6: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

Order processing DFD

Completeorder form

Orderdetails +

blankorder form

Valida teorder

Recordorder

Send tosupplier

Adjustavailablebudget

Budgetfile

Ordersfile

Completedorder form

Signedorder form

Signedorder form

Checked andsigned order

+ ordernotification

Orderamount

+ accountdetails

Signedorder form

Orderdetails

How does this differ from an architectural process model?In the way it is arrived at: one is derived from what information passes through the system, the other from what is happeningMay be a small piece of one of the bubbles in the process model

Page 7: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

8.2.2 State machine models

Model the system response to external and internal eventsOften used for modelling real-time systemsConventions:

• system states are nodes • events are arcs between these nodes • when an event occurs, the system moves from one state to

another

Page 8: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

State machine: microwave oven

Full power

Enabled

do: operateoven

Fullpower

Halfpower

Halfpower

Fullpower

Number

TimerDooropen

Doorclosed

Doorclosed

Dooropen

Start

do: set power = 600

Half powerdo: set power = 300

Set time

do: get numberexit: set time

Disabled

Operation

Timer

Cancel

Waiting

do: display time

Waiting

do: display time

do: display 'Ready'

do: display 'Waiting'

state name

what it does state transitions

Page 9: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

Microwave oven expansion of the Operation state

Cookdo: run generator

Done

do: buzzer on for 5 secs.

Waiting

Alarm

do: display event

do: checkstatus

Checking

Turntablefault

Emitterfault

Disabled

OK

Timeout

TimeOperation

Dooropen

Cancel

*

Page 10: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

Context (8.1) versus Behavioral Models (8.2)

Context: defines system boundaries• high level: fig 8.1 shows simple boundaries• lower level process diagrams (e.g. fig 8.2) show activities,

distinguishing between internal and external activities

Behavioral: how it behaves• data flow (like process, but emphasis is on data)

» sometimes an elaboration of an activity in a process model

• state machine

Page 11: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

Sign On Select Option

Send Message

Process Diagram for IM Operation

...

Select SN Validate SN/PWD

SN/pwd

invalid sign on Present Options

SN

send/SN

Send Message

DFD for IM Sign On

Page 12: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

8.3 (Semantic) data modelsDescribe the logical structure of data processed by the system using ER model How does this differ from CS 325 notation?

Design

namedescriptionC-dateM-date

Link

nametype

Node

nametype

links

has-links

12

1 n

Label

nametexticon

has-labelshas-labels

1

n

1

n

has-linkshas-nodes is-a

1

n

1

n1

1

Page 13: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

8.4 Object models

Describe the system in terms of object classes: a set of objects with common attributes and the services (operations)

Natural way to reflect the real-world entities Abstract entities are more difficult to model this way

Types • inheritance models• aggregation models• interaction models

What do you know about object models?

Page 14: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

Library class hierarchyCatalogue numberAcquisition dateCostTypeStatusNumber of copies

Library item

Acquire ()Catalogue ()Dispose ()Issue ()Return ()

AuthorEditionPublication dateISBN

Book

YearIssue

MagazineDirectorDate of releaseDistributor

Film

VersionPlatform

Computerprogram

TitlePublisher

Published item

TitleMedium

Recorded item

8.4.1 Inheritance models

Page 15: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

Multiple inheritance

# Tapes

Talking book

AuthorEditionPublication dateISBN

Book

SpeakerDurationRecording date

Voice recording

• Object classes can inherit from several super-classes• Can lead to semantic conflicts when attributes/services with the same name in different super-classes have different semantics• Makes class hierarchy reorganization more complex

Page 16: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

Object aggregation

Videotape

Tape ids.

Lecturenotes

Text

OHP slides

Slides

Assignment

Credits

Solutions

TextDiagrams

Exercises

#ProblemsDescription

Course titleNumberYearInstructor

Study pack

Page 17: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

8.4.3 Object behaviour modelling using a UML sequence diagram

:Library User

Ecat:Catalog

Lookup

Issue

Display

:Library Item Lib1:NetServer

Issue licence

Accept licence

Compress

Deliver

Page 18: CS 310 Ch8: System models Abstract descriptions of systems being analyzed to help the analyst understand the system functionality communicate with customers

8.5 Structured Methods

Often a company will have a well-defined modeling process

Structured methods define • a set of models• a process for deriving these models • rules and guidelines that should apply to the models

Normally with specific CASE tool support

This can be too restrictive

More commmon practice:• use a variety of models to elicit requirements