Chapter 5
Chapter 5
Introduction
Design phase transforms SRS
document:
into a form easily implementable in
some programming language.
d1 d2
d3 d1 d4
High-level design
1. low fan-out
Fan-out: a measure of the number of modules
directly controlled by given module.
2. abstraction-abstraction is a way to
describe system’s properties and
behavior in the most generic terms.
Cohesion and Coupling
Cohesion is a measure of:
functional strength of a module.
temporal
logical
coincidental
Coincidental cohesion
sort
search
display
When elements of module are grouped
because the output of one element serves
as input to another and so on, it is called
sequential cohesion.
Functional cohesion
data
stamp
control Degree of
coupling
common
content
Data coupling
Two modules are data coupled,
if they communicate by an
elementary data item that is
passed as a parameter between
the two, eg an integer, a floa,
character etc.
Stamp coupling
Two modules are stamp coupled,
Depth:
number of levels of control
Width:
overall span of control.
Fan-out:
a measure of the number of modules
directly controlled by given module.
Characteristics of
Module Structure
Fan-in:
indicates how many modules
directly invoke a given module.
High fan-in represents code reuse
and is in general encouraged.
Module Structure
Fan out=2
Fan out=1
Fan in=2
Fan out=0
Goodness of Design
Function-oriented design
Object-oriented design
Function-Oriented
Design
A system is looked upon as something
that performs a set of functions.
Starting at this high-level view of the
system:
each function is successively refined into
more detailed functions.
Each subfunction:
In OOD:
software is not developed by
designing functions such as:
1. update-employee-record,
2. get-employee-address, etc.