Software Design
Software Design
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
Introduction:
temporal
logical
coincidental
LOW
Coincidental cohesion
display
Functional cohesion
data
stamp
control Degree of
coupling
common
content
Data coupling
If the dependency between the modules
is based on the fact that they
communicate by passing only data, then
the modules are said to be data coupled.
In data coupling, the components are
independent of each other and
communicate through data.
Module communications don’t contain
tramp data.
Example-customer billing system.
Stamp coupling
In stamp coupling, the complete data
structure is passed from one
module to another module.
Therefore, it involves tramp data
i.e, Data which is passed via one
function to another, and not
otherwise used by the first.
Control coupling
It exists between two modules.
If Data from one module is used
to direct order of instruction
execution in another.
Example of control coupling:
a flag set in one module and tested
in another module.
Common Coupling
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=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.