Documente Academic
Documente Profesional
Documente Cultură
Introduction
Design phase transforms SRS
document:
into a form easily implementable in
some programming language.
d1 d2
d3 d1 d4
High-level design
Understandability of a design
is a major issue:
determines goodness of design:
a design that is easy to
understand: also easy to
maintain and change.
What Is Good Software
Design?
A modular and
hierarchical Poor modularity and
design hierarchy
Modularity
1. low fan-out
Fan-out: a measure of the number of
modules directly controlled by given
module.
2. abstraction
FAN OUT
A B B C D E F
FAN OUT
Z
fan-out is reduced by
creating a module X
to reduce the number
of modules invoked
directly by Z.
A B C D x
E F
Cohesion and Coupling
temporal
logical
coincidental
Contd.
High Cohesion
Functional
Sequential
Communicational
Procedural
Temporal
Logical
Coincidental Low
Coincidental cohesion
Functions:
Issue-book
create member
request librarian leave
Logical cohesion
search
display
Functional cohesion
Function A
Function B
Function C
Procedural
Related by order of functions
35
35
Examples of Cohesion
(Cont.)
Function A Function A
Function B Function B
Function C Function C
Communicational Sequential
Access same data Output of one is input to another
Function A part 1
Function A part 2
Function A part 3
Functional
Sequential with complete, related functions
36
36
Coupling
Coupling indicates:
how closely two modules interact
or how interdependent they are.
The degree of coupling between
two modules depends on their
interface complexity.
High Coupling
Content Avoid
Common
External
Control
Stamp
Communication
X by passing data Y
Stamp coupling
Two modules are stamp coupled,
Share the
same global
data
X Y
Content coupling
Content coupling exists between two
modules:
if they share code,
Depth:
number of levels of control
Fan-out:
a measure of the number of modules
directly controlled by given module.
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.