1 Chapter 6-7 Analysis Modeling Adapted by Dan Fleck from: - Roger Pressman’s Slides - - Jochen
50
1 Chapter 6-7 Analysis Modeling Adapted by Dan Fleck from: - Roger Pressman’s Slides - http://www.informatics.sussex.ac.uk/users/lb203/se /SE04.pdf - Jochen Rick’s slides from GA Institute of Technology - http://webfuse.cqu.edu.au/Courses/aut2001/95169/ Extra_Examples/DFD_Example_1/ - System Analysis and Design slides edited by Yale Braunstein Coming up: Requirements Analysis
1 Chapter 6-7 Analysis Modeling Adapted by Dan Fleck from: - Roger Pressman’s Slides - - Jochen
1 Chapter 6-7 Analysis Modeling Adapted by Dan Fleck from: -
Roger Pressmans Slides -
http://www.informatics.sussex.ac.uk/users/lb203/se/SE04.pdf -
Jochen Ricks slides from GA Institute of Technology -
http://webfuse.cqu.edu.au/Courses/aut2001/95169/
Extra_Examples/DFD_Example_1/ - System Analysis and Design slides
edited by Yale
Braunsteinhttp://www.informatics.sussex.ac.uk/users/lb203/se/SE04.pdfhttp://webfuse.cqu.edu.au/Courses/aut2001/95169/
Coming up: Requirements Analysis
Slide 2
Earlier Talked about requirements Frequently in written form
Supplemented by other analyses 2
Slide 3
Requirements Analysis Results in models: Scenario-based models
(from POV of actors) Data models (information domain for the
problem) Class-oriented models Flow-oriented models Behavioral
models (how the software behaves according to external events)
3
Slide 4
4 Analysis Phase: What is it? Three objectives of requirements:
To describe what the customer requires 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 Three objectives of
requirements: To describe what the customer requires 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
Coming up: Elements of the Analysis Model Software, hardware, data,
human elements Software application architecture, user interface,
component-level structure
Slide 5
5 Elements of the Analysis Model Use-case diagrams Use cases -
text Activity Diagrams Swim lane diagrams Scenario-based elements
Class diagrams Analysis Packages CRC Models Collaboration Diagrams
Class-based elements Data-flow diagrams Control flow diagrams
Processing narratives Flow-oriented elements State diagrams
Sequence diagrams Behavioral elements Analysis Model Coming up:
Elements of the Analysis Model
Slide 6
6 Typical Classes (a reminder) External entities - printer,
user, sensor Things - reports, displays, signals Occurrences or
events (e.g., interrupt, alarm) Roles (e.g., manager, engineer,
salesperson) Organizational units (e.g., division, team) Places
(e.g., manufacturing floor or loading dock) Structures (e.g.,
sensors, four-wheeled vehicles, or computers) But, how do we select
classes? Coming up: Selecting ClassesCriteria
Slide 7
7 Selecting ClassesCriteria needed services operations that
change the attributes multiple attributes if it is only one
attribute, probably should be part of another class common
attributes common things for all instances of a class common
operations for all instances of the class essential requirements
appear in the PROBLEM space (remember were doing analysis
modeling!) retained information information about it must be
remembered Coming up: Selecting ClassesExample
Slide 8
8 Selecting ClassesExample needed services multiple attributes
common attributes common operations essential requirements retained
information Coming up: CRC Cards ATMUser Yes PinNum Yes No Yes
Maybe Yes
Slide 9
CRC Cards Is there a better way to find classes? Sure Class
Responsibility Collaborator Cards (see CRC slides and book pg 173)
Coming up: Elements of the Analysis Model 9
Slide 10
10 Use-case diagrams Use cases - text Activity Diagrams Swim
lane diagrams Scenario-based elements Class diagrams Analysis
Packages CRC Models Collaboration Diagrams Class-based elements
Data-flow diagrams Control flow diagrams Processing narratives
Flow-oriented elements State diagrams Sequence diagrams Behavioral
elements Analysis Model Elements of the Analysis Model Coming up:
The ERD: An Example
Slide 11
11 The ERD: An Example places Customer request for service
generates workorder worktasks materials consistsof lists (1,1)
selectedfrom standard task table Coming up: Data Modeling
Slide 12
12 Data Modeling 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 Coming up: What is a Data Object?
Slide 13
13 What is a Data Object? Object something that is described by
a set of attributes (data items) and that will be manipulated
within the software (system) eachinstance of an object (e.g., a
book) can be identified uniquely (e.g., ISBN #) each plays a
necessary role in the system i.e., the system could not function
without access to instances of the object each is described by
attributes that are themselves data items What are some typical
data objects? Coming up: Typical Data Objects
Slide 14
14 Data Objects and Attributes A data object contains a set of
attributes that act as an aspect, quality, characteristic, or
descriptor of the object object: automobile attributes: make make
model model body type body type price price options code options
code How do data objects differ from OO classes or do they? Coming
up: What is a Relationship?
Slide 15
15 What is a Relationship? relationship indicates
connectedness; a "fact" that must be "remembered" by the system and
cannot or is not computed or derived mechanically several instances
of a relationship can exist objects can be related in many
different ways Coming up: Crows Foot Style ERD
Slide 16
16 Crows Foot Style ERD Coming up: ERD Example: From
http://www.b2ttraining.com The ERD: Other styles exist. There are a
few, but most are more confusing and less common than Crows foot.
Depending on who you ask this was invented by Dr. Gordon Everest or
Clive Finkelstein. Teacher Class Student Address Teacher teaches 0
to many classes Classes have 1 and only 1 teacher Students have 1
to many addresses An address is for zero to one student (addresses
may not be associated with multiple students) First thing denotes
optional or mandatory. Second thing denotes cardinality (one or
many)
Slide 17
17 Coming up: Elements of the Analysis Model ERD Example: From
http://www.b2ttraining.com
Slide 18
18 Use-case diagrams Use cases - text Activity Diagrams Swim
lane diagrams Scenario-based elements Class diagrams Analysis
Packages CRC Models Collaboration Diagrams Class-based elements
Data-flow diagrams Control flow diagrams Processing narratives
Flow-oriented elements State diagrams Sequence diagrams Behavioral
elements Analysis Model Elements of the Analysis Model Onward to
data flow diagrams! Coming up: Flow-Oriented Modeling
Slide 19
19 Flow-Oriented Modeling Represents how data objects are
transformed at they move through the systemRepresents how data
objects are transformed at they move through the system A data flow
diagram (DFD) is the diagrammatic form that is used to show how
data is transformed as it moves through the systemA data flow
diagram (DFD) is the diagrammatic form that is used to show how
data is transformed as it moves through the system Considered by
many to be an old school approach, flow-oriented modeling continues
to provide a view of the system that is uniqueit should be used to
supplement other analysis model elementsConsidered by many to be an
old school approach, flow-oriented modeling continues to provide a
view of the system that is uniqueit should be used to supplement
other analysis model elements Coming up: The Flow Model
Slide 20
20 The Flow Model Every computer-based system is an information
transform.... computerbasedsystem data input output Coming up: Flow
Modeling Notation
Slide 21
21 Flow Modeling Notation external entity process data flow
data store Coming up: External Entity
Slide 22
22 External Entity A producer or consumer of data Examples: a
person, a device, a sensor Data must always originate somewhere and
must always be sent to something Coming up: Process
Slide 23
23 Process A data transformer (changes input to output)
Examples: compute taxes, determine area, format report, display
graph Data must always be processed in some way to achieve system
function Coming up: Data Flow
Slide 24
24 Data Flow Data flows through a system, beginning as input
and be transformed into output. computetrianglearea base height
area Coming up: Data Stores Key thought: In a DFD the DATA is what
is moving on the arrows!
Slide 25
25 Data Stores Data is often stored for later use.
look-upsensordata sensor # report required sensor #, type,
location, age sensor data sensor number type, location, age Coming
up: Data Flow Diagramming: Guidelines In a real system what things
are Data Stores?
Slide 26
26 Data Flow Diagramming: Guidelines 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 ensure that you show DATA
moving through the system (not control) Coming up: Constructing a
DFDI
Slide 27
27 Constructing a DFDI review the data model to isolate data
objects and use a grammatical parse to determine operations
determine external entities (producers and consumers of data)
create a level 0 DFD Coming up: Level 0 DFD Examples
Slide 28
28 Level 0 DFD Examples user processingrequest videosource NTSC
video signal digitalvideoprocessor requestedvideosignal monitor
Coming up: Constructing a DFDII
Slide 29
29 Constructing a DFDII 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 Coming up: The Data Flow Hierarchy
Slide 30
30 The Data Flow Hierarchy P a b xy p1 p2 p3 p4 5 a b c d e f g
level 0 level 1 Coming up: Example DFD: Level 1
Slide 31
31 Example DFD: Level 1 Coming up: DFD: A practical
example
Slide 32
32 DFD: A practical example Launched Dec. 11, 1998, the Climate
Orbiter plunged too steeply into the Martian atmosphere Sept. 23,
1999, and either burned up or crashed. In an initial failure report
released Oct. 15, 2000 the review board blamed the navigation error
on a communications foul-up between NASA's Jet Propulsion
Laboratory and prime contractor Lockheed Martin. Coming up: DFD
Example
Slide 33
DFD Example Example from http://ldtconsultinginc.com/
http://ldtconsultinginc.com/ Can we add labels to unlabled data
flows? Is this a level 0 diagram? Coming up: Lets Try It 33
Slide 34
Lets Try It Lets create a DFD for A carpet cleaning business A
web-based order processing system for a computer store An address
book for an iPhone Coming up: Flow Modeling Notes 34
Slide 35
35 Flow Modeling Notes 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 a single data flow item (arrow) may be expanded
as levels increase (data dictionary provides information) The
things that move on the arrows are DATA! Coming up: Elements of the
Analysis Model
Slide 36
36 Use-case diagrams Use cases - text Activity Diagrams Swim
lane diagrams Scenario-based elements Class diagrams Analysis
Packages CRC Models Collaboration Diagrams Class-based elements
Data-flow diagrams Control flow diagrams Processing narratives
Flow-oriented elements State diagrams Sequence diagrams Behavioral
elements Analysis Model Elements of the Analysis Model Oh behave!
Coming up: Behavioral Modeling
Slide 37
37 Behavioral Modeling The behavioral model indicates how
software will respond to external events or stimuli. To create the
model, the analyst must perform the following steps: Evaluate all
use-cases to fully understand the sequence of interaction within
the system. Identify events that drive the interaction sequence and
understand how these events relate to specific objects. Create a
sequence diagram for each use-case. Build a state diagram for the
system. Review the behavioral model to verify accuracy and
consistency. Coming up: State Representations
Slide 38
38 State Representations In the context of behavioral modeling,
two different characterizations of states must be considered: the
state of each class as the system performs its function and the
state of the system as observed from the outside as the system
performs its function What are some states for an ATM machine?
Washing machine? Cell phone? Coming up: State Diagram for the
ControlPanel Class
Slide 39
39 State Diagram for the ControlPanel Class Coming up: State
Diagram Details
Slide 40
State Diagram Details Coming up: The States of a System 40
State Name (verb in current tense) (Optional) actions happening
during state Name Examples: sorting validating updating status [age
> 20] [age