Professional Documents
Culture Documents
9 - Requirement Modeling (1)
9 - Requirement Modeling (1)
3
Requirement Steps
4
1. What’s
modeling?
• A complicated object in the real
world, e.g., an airplane
• How can you make it?
• How can you know its design?
• …
5
What is a model?
6
Why model?
7
Discussion
8
The important of modeling
9
Model as a blueprint of a system
Approach: Floorplan
2. Design
1. Requirements
10
Observation: Floorplan abstracts from, e.g., . . .
• kind, number, and placement of bricks, • water pipes/wiring, and
• subsystem details (e.g., window style),
Model as a blueprint of a system
Floorplan as an Abstraction
Floorplan
γ
all houses
F
F •
•
• •
H
α
α
Floorplan F
•• Floorplan F denotes
denotes a set γ(F ) of houses (concretisations of F ), 11
Smodel ––
which differ,
which differ, e.g.
e.g. in
in colour
colour of bricks, or making of windows.
2013-10-21 –– Smodel
Floorplan F
•• Floorplan F represents
represents house H according to abstraction α.
2013-10-21
By adding
•• By adding information
information to F (such as making of windows),
Principals of modeling
12
Principal 1: the choice of model is important
• In software, the models you choose greatly affect your world view
13
Principal 2: Levels of precision may differ
• The best kinds of models let you choose your degree of detail,
depending on:
• Who is viewing the model
14
Principal 3: The best
models are connected to
reality
• All models simplify reality
• A good model reflects potentially fatal
characteristics.
15
Principal 4: No single
model is sufficient
• No single model is sufficient. Every non-
trivial system is best approached
through a small set of nearly
independent models: 4+1 View
• Create models that can be built and
studied separately, but are still
interrelated.
16
Modeling tools for software requirements
17
Data Flow Diagram
• DFD
• A formal way to represent how a business takes place in practice
• DFD represents business processes of a system and how data flows
are transmitted among these processes
• 2 types of processes:
• Logical process: only represents the business and does not contain details
about actual installation or implementation
• Physical process: contains additional information about real-world
implementations
18
Components of a DFD
19
Components of a DFD (2/2)
Gane Sarson
Visio 2000
DFD
20
Example
• A DFD represents the course registration
process
• What are
• Entities
• Processes
• Data stores
• Data flows
21
Finite State Machine
22
Example
Discussion:
• Are all events valid
for all states?
23
Components of State Machine Diagram (1/2)
Component Main information Symbol
State Name (noun)
24
Components of State Machine Diagram (2/2)
With transitions:
• Their labels represent events or triggers that, when these events or
triggers occur, will lead to a state transition
25
Case study
26
Case study (2/2)
27
Entity Relation Diagram
• ERD
• Used to model data entities and their relationships in relational
database systems
• ERD can be used to specify data requirements as well as be used in the
design phase.
28
Components of ERD
29
Example
30
Solution
Book-id
Pub-id
Title Author
Address
Price Available
Book
Publisher
Published
by
Name
Member- Borrowed
id by
Expired-
date Member Name
Member-
Address
date Member-
type
31
09 – Requirement Modeling
(end of lecture)
32