Beruflich Dokumente
Kultur Dokumente
Nien-Lin Hsueh
Outline
Basic concept of analysis model Data model ER model Object model Functional model Data flow model Behavioral model State transition model System behavior modeling with sequence diagram
Objectives of analysis model To describe what the customer require To establish a basis for the creation of a software design To define a set of requirements that can be validated once the software is built
Model
What is a model? a model is a simplification of reality Why do we model? we build models so that we can better understand the system we are developing we build models of complex systems because we cannot comprehend such a system in its entirety four aims to achieve
help us to visualize a system permit us to specify the structure/behavior of a system give us a template that guides us in constructing systems document the decisions we have made
Analysis Model
Function
Data Object description
ERD
Data dictionary
DFD
Data
STD
Behavior
Control Specification (CSPEC)
Function
Use case diagram Activity diagram
Data
Object
Behavior
State-chart diagram Interaction diagram
Examines data objects independently of processing Focuses attention on the data domain Creates a model at the customers level of abstraction Indicates how data objects relate to one another
Automobile Make Model Body type Price Color Software Engineering Lab., FCU
Person
Relationship
Connectedness A fact that must be remembered by the system and cannot or is not computed or derived Several instance of a relationship can exist Entity can be related in many ways
own
own
An Example
Customer
(1,1)
places
(1,m)
(1,1)
consists of lists
10
, ,
11
Object models
Object = entity (in ERD) + operations Object models describe the system in terms of object classes An object class is an abstraction over a set of objects with common attributes and the services (operations) provided by each object Various object models may be produced Inheritance models Aggregation models Interaction models
12
Object models
Natural ways of reflecting the real-world entities manipulated by the system Object class identification is recognised as a difficult process requiring a deep understanding of the application domain Object classes reflecting domain entities are reusable across systems
13
Inheritance models
Organise the domain object classes into a hierarchy Classes at the top of the hierarchy reflect the common features of all classes Object classes inherit their attributes and services from one or more super-classes. these may then be specialised as necessary
14
Library item Catalogue number Acquisition date Cost Type Status Number of copies Acquire () Catalogue () Dispose () Issue () Return ()
Libr ary user Name Address Phone Registration # Register () De-r egister ()
Reader Affiliation
Object Aggregation
Aggregation model shows how classes which are collections are composed of other classes Similar to the part-of relationship in semantic data models
17
Object Aggregation
18
Functional Modeling: Data Flow Diagram Every computer-based system is an information transform ....
input
output
19
Notation
external entity
process
20
External Entity
A producer or consumer of data Example: person, device, system, sensor Data must always originate from somewhere, and must always be sent to something
21
Process
A data transformer (changes input to output) Example: compute taxes, determine area, format report, display graph Data must always be process in some way to achieve system function
22
Data Flow
Data flows through a system, beginning as input and be transformed into output
height
23
Data Store
report required
sensor number
sensor data
24
all icons must be labeled with meaningful names the DFD evolves through a number of levels of detail always begin with a context level diagram (also called level 0) always show external entities at level 0 always label data flow arrows do not represent procedural logic
25
Level 0
user
monitor
video source
26
Refine Process
write a narrative describing the transform parse to determine next level transforms balance the flow to maintain data flow continuity develop a level 1 DFD use a 1:5 (approx.) expansion ratio
27
Level 1
level 0
c
p1
p2
f
p4
d
level 1
p3
28
Each bubble is refined until it does just one thing The expansion ratio decreases as the number of levels increase Most systems require between 3 and 7 levels for an adequate flow model
29
Using PSPEC
Process Specification (PSPEC) can be used to specify the processing details implied by a process within a DFD
Check & convert pressure
PSPEC
If absolute tank pressure > max pressure then set above pressure to true; else set above pressure to false; begin conversion algorithm x-01a; compute converted pressure; end end if
30
analysis model
Maps into
design model
31
Behavioral Modeling
behavior
32
Basic concept
State: a set of observable circum-stances that characterizes the behavior of a system at a given time State transition: the movement from one state to another Event: an occurrence that causes the system to exhibit some predictable form of behavior Action: process that occurs as a consequence of making a transition
33
State Modeling
1. 2.
3.
Make a list of the different states of a system (How does the system behave?) Indicate how the system makes a transition from one state to another (How does the system change state?) 1. indicate event 2. indicate action Draw a state transition diagram
34
Notation
Event button1&2Pressed Blink Hours Initial state button2Pressed State Increment Hours
Transition
button1Pressed
button2Pressed
button1&2Pressed
Blink Minutes
Increment Minutes
button1Pressed button2Pressed
Stop Blinking
Blink Seconds
Increment Seconds
35
Example
full and start invoke manage-copying reading operator commands copies done invoke read-op-input making copies full invoke read-op-input
36
State Generalization
37
State Aggregation
38
A behavioural model shows the interactions between objects to produce some particular system behaviour that is specified as a usecase Sequence diagrams (or collaboration diagrams) in the UML are used to model interaction between objects
39
Ecat: Catalog :Library User Lookup Display Issue Issue licence Accept licence
:Library Item
Compress
Deliver
40
The problem is not that there are problems. The problem is expecting otherwise and thinking that having problems is a problem Theodore Rubin
41
Homework
Meeting Scheduler System Request for Proposal (RFP) ERD , 5 DFD , level 2 STD , ? ? ?
42