Other symbols can precede an element within a
package. A minus sign indicates that an element is hidden from all other
packages and a # symbol indicates that an element is accessible only to
packages contained within a given package.
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 for each use-case.
·
Build a state diagram for the system.
·
Review the behavioral model to verify accuracy and
consistency.
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
The state of a class takes on both passive and
active characteristics.
-
A passive state is simply the current
status of all of an object’s attributes.
-
The active state of an object indicates
the current status of the object as it undergoes a continuing
transformation or processing.
- State transition diagrams
represent the system states and events that trigger state transitions
- 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
- STD's indicate actions (e.g. process activation) taken as a
consequence of a particular event
- A state is any observable mode of behavior
State Diagram for the ControlPanel Class

Sequence Diagram

- Hatley and Pirbhai control flow diagrams (CFD) can also be
used for behavioral modeling
- Iconography
- Rectangles represent system states
- Arrows represent transitions between states
- Each arrow is labeled with a ruled expression
- Top value - the event(s) that cause the
transition to occur
- Bottom value - the action that occurs as a
consequence of the event
Example
Level 1 CFD for photocopier software

State transition diagram for photocopier software

- Building a Behavioral Model
- 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?)
- indicate event
- indicate action
- draw a state transition diagram

Data Dictionary Contents
Data dictionary is an
organized listing of all data elements that are pertinent to the system, with
precise, rigorous definitions so that both user and system analyst will have a
common understanding of inputs, outputs, components of stores and [even]
intermediate calculations
- Name - primary name for each data or control item, data store, or
external entity
- Alias - alternate names for each data object
- Where-used/how-used - a listing of processes that use the data or
control item and how it is used (e.g. input to process, output from
process, as a store, as an external entity)
- Content description - notation for representing content
- Supplementary information - other data type information, preset values,
restrictions, limitations, etc.
Notation
Data Construct
|
Notation
|
Meaning
|
|
=
|
is composed of
|
Sequence
|
+
|
and
|
Selection
|
[ | ]
|
either-or
|
Repetition
|
{}n
|
n repetitions of
|
|
( )
|
optional data
|
|
* ... *
|
delimits comments
|
Notation enables representation of composite
data in one of the three fundamental ways that it can be constructed:
- As a sequence of data items.
- As a selection from among a set of data items.
- As a repeated grouping of data items. Each data item entry that is
represented as part of a sequence, selection, or repetition may itself be
another composite data item that needs further refinement within the
dictionary.

Design Engineering (Chapter 9)
- Software requirements model is transformed into design models that
describe the details of the data structures, system architecture,
interface, and components
- Each design product is reviewed for quality before moving to the
next phase of software development
Translating the analysis model into a software design

Design Specification Models
- Data design - created by transforming the analysis
information model (data dictionary and ERD) into data structures required
to implement the software
- Architectural design - defines the relationships among the major structural
elements of the software, it is derived from the system specification, the
analysis model, and the subsystem interactions defined in the analysis
model (DFD)
- Interface design - describes how the software elements
communicate with each other, with other systems, and with human users; the
data flow and control flow diagrams provide much the necessary information
- Component-level design - created by transforming the structural
elements defined by the software architecture into procedural descriptions
of software components using information obtained from the PSPEC, CSPEC,
and STD
The Design Process
- Good Design Characteristics
- The design must implement all of the explicit
requirements contained in the analysis model, and it must accommodate all
of the implicit requirements desired by the customer.
- The design must be a readable, understandable
guide for those who generate code and for those who test and subsequently
support the software.
- The design should provide a complete picture of
the software, addressing the data, functional, and behavioral domains
from an implementation perspective.
- Design Guidelines
1.
A design should exhibit
an architectural structure that it:
(1) has been created using recognizable design
patterns
(2) is composed of components that exhibit good
design characteristics
(3) can be implemented in an evolutionary
fashion, thereby facilitating implementation and testing.
2.
A design should be
modular; that is, the software should be logically partitioned into elements
that perform specific functions and subfunctions.
3.
A design should contain
distinct representations of data, architecture, interfaces, and components
(modules).
4.
A design should lead to
data structures that are appropriate for the objects to be implemented and are
drawn from recognizable data patterns.
5.
A design should lead to
components that exhibit independent functional characteristics.
6.
A design should lead to
interfaces that reduce the complexity of connections between modules and with
the external environment.
7.
A design should be
derived using a repeatable method that is driven by information obtained during
software requirements analysis.
Design Principles
- The design process should not suffer from "tunnel
vision."
- The design should be traceable to the analysis model.
- The design should not reinvent the wheel.
- The structure of the software design should mimic the
structure of the problem domain.
- The design should exhibit uniformity and integration.
- The design should be structured to accommodate change.
- The design should be structured to degrade gently, even when
aberrant data, events, or operating conditions are encountered.
- Design is not coding, coding is not design.
- The design should be assessed for quality as it is being created,
not after the fact.
- The design should be reviewed to minimize conceptual (semantic)
errors.
Software Design Concepts
- Abstraction - allows
designers to focus on solving a problem without being concerned about
irrelevant lower level details (procedural abstraction - named sequence of
events, data abstraction - named collection of data objects)
- Refinement - process of
elaboration where the designer provides successively more detail for each
design component
- Modularity - the degree
to which software can be understood by examining its components
independently of one another
Modularity and software cost

- Modular Design Method Evaluation Criteria
- Modular decomposability - provides systematic means for breaking problem
into subproblems
- Modular composability - supports reuse of existing modules in new
systems
- Modular understandability - module can be understood as a stand-alone
unit
- Modular continuity - side-effects due to module changes
minimized
- Modular protection - side-effects due to processing errors
minimized
- Software architecture -
overall structure of the software components and the ways in which that
structure provides conceptual integrity for a system
- Structural properties - Defines the components of a system (e.g.,
modules, objects, filters) and the manner in which those components are
packaged and interact with one another.
- Extra-functional properties - The architectural design description should
address how the design architecture achieves requirements for
performance, capacity, reliability, security, adaptability, and other
system characteristics.
- Families of related systems - The architectural design should draw upon
repeatable patterns that are commonly encountered in the design of families
of similar systems. In essence, the design should have the ability to
reuse architectural building blocks.
- Control hierarchy or program structure - represents the module organization and
implies a control hierarchy, but does not represent the procedural aspects
of the software (e.g. event sequences)
Typical Hierarchical Control Structure

- Structural partitioning
- horizontal partitioning - defines three partitions (input, data
transformations, and output)
- Benefits:
- software that is easier to test
- software that is easier to maintain
- propagation of fewer side effects
- software that is easier to extend
- vertical partitioning (factoring) - distributes control in a
top-down manner (control decisions in top level modules and processing
work in the lower level modules)

- Data structure - representation
of the logical relationship among individual data elements (requires at
least as much attention as algorithm design)
- Software procedure -
precise specification of processing (event sequences, decision points,
repetitive operations, data organization/structure)
- Information hiding -
information (data and procedure) contained within a module is inaccessible
to modules that have no need for such information
Effective Modular Design
Functional Independence
- Design software so that each module addresses a specific
subfunction of requirements and has a simple interface when viewed from
other parts of the program structure
- Measured using two qualitative criteria:
- Cohesion is a measure of the relative functional strength of a module
- Natural extension of the information hiding
- Cohesive module performs a single task within
a software procedure, requiring little interaction with procedures being
performed in other parts of a program
- Range of Cohesion - low (worse) to high (better)
low
|
coincidental cohesion
|
module that performs tasks
that are related logically
|
|
temporal cohesion
|
module contains tasks that
are related by the fact that all must be executed with the same spanof time
|
|
procedural cohesion
|
processing elements of a module
are related and must be executed in a specific order
|
|
communicational
cohesion
|
all processingelements
concentrate on one area of a data structure
|
high
|
|
module that performs one
distinctprocedural task.
|
- Coupling is a measure of the relative interdependence among modules
- Best - lowest possible coupling
low
|
data coupling
|
simple data are passed- a
one-to-one correspondence of items exists
|
|
stamp coupling
|
a portion of a datastructure
(rather than simple arguments) is passed via a module interface
|
|
control coupling
|
where a "control
flag" is passed between modules
|
|
external coupling
|
modules are tied toan
environment external to software
|
|
common coupling
|
when a number of
modulesreference a global data area
|
high
|
content coupling
|
when one modulemakes use
of data or control information maintained within the boundaryof another
module
|
Design Heuristics for
effective Modularity
Program structure can be
manipulated according to the following set of heuristics:
- Evaluate the "first iteration" of the program structure
to reduce coupling and improve cohesion
- Attempt to minimize structures with high fan-out; strive for fan-in
as depth increases
- Keep the scope of effect of a module within the scope of control of
that module
- Evaluate module interfaces to reduce complexity and redundancy and
improve consistency
- Define modules whose function is predictable, but avoid modules
that are overly restrictive
- Strive for "controlled entry" modules by avoiding
"pathological connections."

Design Documentation
Software Design Specification from:
- System Specification
- Software Requirements Specification