System Models

Download Report

Transcript System Models

Software Engineering
Chapter 8
System Models
Ku-Yaw Chang
[email protected]
Assistant Professor
Department of Computer Science and Information Engineering
Da-Yeh University
Objectives
Understand why it is important to establish the
boundaries of a system and model its context
Understand the concepts of behavioral modeling, data
modeling and object modeling
Have been introduced to some of the notations defined
in the UML and how these notations may be used to
develop system models
Ku-Yaw Chang
System Models
2
Preamble
User requirements


Be written in natural language
Be understood by people who are not technical
experts
To document the system specification as a set of
system models

Graphical representations
Ku-Yaw Chang
System Models
3
Preamble
A system model

An abstraction of the system
Leave out detail

Rather than an alternative representation
Different models from different perspectives

An external perspective
Context or environment of the system

A behavioral perspective
Behavior of the system

A structural perspective
Architecture of the system
Structure of the data
Ku-Yaw Chang
System Models
4
Contents
8.1 Context models
8.2 Behavioral models
8.3 Data models
8.4 Object models
8.5 Structured methods
Ku-Yaw Chang
System Models
5
Context Models
Decide on the boundaries of the system

In the requirements elicitation and analysis
To distinguish


What is the system
What is the system’s environment
Ku-Yaw Chang
System Models
6
The context of an ATM system
Secu rity
sy stem
Bran ch
acco un tin g
sy stem
Acco u nt
d atab ase
Au to-teller
sy stem
Bran ch
co un ter
sy stem
Usag e
d atabase
Main tenance
sy stem
Ku-Yaw Chang
System Models
7
Contents
8.1 Context models
8.2 Behavioral models
8.3 Data models
8.4 Object models
8.5 Structured methods
Ku-Yaw Chang
System Models
8
Behavioral Models
Two types of behavioral models

Data-flow models
Model the data processing

State machine models
Model how the system reacts to events
Ku-Yaw Chang
System Models
9
Data-flow Models
Show how data flows through a sequence of
processing steps
Notation



Functional processing (rounded rectangles)
Data stores (rectangles)
Data movements between functions (labeled arrows)
Ku-Yaw Chang
System Models
10
Data-flow diagram
of order processing
Ku-Yaw Chang
System Models
11
Data-flow diagram
of an insulin pump
Ku-Yaw Chang
System Models
12
State Machine Models
Describe how a system responds to internal or
external events


Often used for modeling real-time systems
Statechart diagrams in UML
The system is in one of a number of possible
states.
Ku-Yaw Chang
System Models
13
State machine models
Ku-Yaw Chang
System Models
14
Microwave oven state description
State
Description
Waiting
The oven is waiting for input. The display shows the current time.
Half p ower
The oven power is set to 300 watts. The display shows ŌH
alf p owerÕ.
Full power
The oven power is set to 600 watts. The display shows ŌF
ull 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 s econds. Oven light is on. Display
shows ŌCooking completeÕ while buzzer is sounding.
Ku-Yaw Chang
System Models
15
Microwave oven stimuli
Stimulus
Description
Half p ower
The user has pressed the half power button
Full power
The user has pressed the full power button
Time r
The user has pressed one of the timer buttons
Numb er
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
Ku-Yaw Chang
System Models
16
Contents
8.1 Context models
8.2 Behavioral models
8.3 Data models
8.4 Object models
8.5 Structured methods
Ku-Yaw Chang
System Models
17
Data Models
Many systems make use of a large database of
information

The database is independent of the software system
Data modeling technique


Entity-Relation-Attribute modeling (ERA modeling)
or
Entity Relation Diagram (ERD)
Ku-Yaw Chang
System Models
18
Data Models
The UML does not include a specific notation for
this database modeling.
ERA model

Simplified object classes
no operations

Attributes
class attributes

Named associations between the classes
relations
Ku-Yaw Chang
System Models
19
Semantic Data Model
for the LIBSYS system
Ku-Yaw Chang
System Models
20
Data Dictionaries
Lists of all of the names used in the system
models

Descriptions of the entities, relationships and
attributes are also included
Advantages


Support name management and avoid duplication;
Store of organizational knowledge linking analysis,
design and implementation;
Ku-Yaw Chang
System Models
21
Data Dictionary Entries
Name
Description
Type
Date
Article
Details of the published article that may be ordered by
Entity
people using LIBSYS.
30.12.2002
authors
The names of the authors of the article who may be due
Attribute
a share of the fee.
30.12.2002
Buyer
The person or organisation that orders a co py of the
Entity
article.
30.12.2002
A 1:1 relationship between Article and the Copyright
Relation
Agency who should be paid the copyright fee.
29.12.2002
The address of the buyer. This is used to any paper
Attribute
billing information that is required.
31.12.2002
feepayable-to
Address
(Buyer)
Ku-Yaw Chang
System Models
22
Contents
8.1 Context models
8.2 Behavioral models
8.3 Data models
8.4 Object models
8.5 Structured methods
Ku-Yaw Chang
System Models
23
Object Models
An object-oriented approach is commonly used

The UML has become a standard for object modeling
Three models



Inheritance models
Object aggregation
Object behavioral modeling
Ku-Yaw Chang
System Models
24
Inheritance Models
Library item
Catalo g ue n u mb er
Acq uis ition date
Cos t
Ty pe
Statu s
Number o f cop ies
Acq uire ()
Catalo g ue ()
Disp os e ()
Is su e ()
Return ()
Pub lished item
Recor d ed item
Title
Med iu m
Title
Pub lisher
Boo k
Au tho r
Edition
Pub lication da te
ISBN
Ku-Yaw Chang
Mag azine
Year
Is su e
Film
Directo r
Date of releas e
Distrib u tor
System Models
Compu ter
p ro gram
Versio n
Platfo rm
25
Inheritance Models
Library u ser
Name
Add res s
Pho ne
Reg is tration #
Reg is ter ()
De-r eg is ter ()
Reader
Borrower
Items o n loan
Max . loan s
Affiliation
Staff
Dep ar tmen t
Dep ar tmen t p ho n e
Ku-Yaw Chang
System Models
Stud en t
Majo r sub ject
Home ad d res s
26
Object Aggregation
Ku-Yaw Chang
System Models
27
Object Behavior Modeling
Ku-Yaw Chang
System Models
28
Contents
8.1 Context models
8.2 Behavioral models
8.3 Data models
8.4 Object models
8.5 Structured methods
Ku-Yaw Chang
System Models
29
The components of a CASE tool
Ku-Yaw Chang
Data
d iction ary
Stru ctu red
d iag rammin g
to ols
Rep or t
g ener ation
facilities
Cod e
gener ator
Cen tr al
in fo rma tion
rep os ito ry
Query
lang uag e
facilities
Fo rms
cr ea tion
to ols
Design , anal y sis
an d ch eckin g
to ols
Impo r t/e x po rt
facilities
System Models
30
The End