Function Oriented Design PDF
Function Oriented Design PDF
Software Design
Partly
Assembled
Car
Fit Fit Fit Paint and
Engine Doors Wheels Test
Chassis Assembled
with Engine Car Car
A DFD model:
Uses limited types of symbols.
Simple set of rules
Easy to understand:
It is a hierarchical model.
Hierarchical Model
Human mind can easily understand
any hierarchical model:
In a hierarchical model:
We start with a very simple and abstract
model of a system,
Details are slowly introduced through
the hierarchies.
Data Flow Diagrams (DFDs)
Primitive Symbols Used for Constructing DFDs:
External Entity Symbol
Represented by a rectangle
External entities are real Librarian
physical entities:
input data to the system or
consume data produced by the system.
Sometimes external entities are called
terminator, source, or sink.
Function Symbol
A function such as “search-book” is
represented using a circle:
search-
This symbol is called a book
process or bubble or transform.
Bubbles are annotated with
corresponding function names.
Functions represent some activity:
Function names should be verbs.
Data Flow Symbol
A directed arc or line. book-name
Tic-tac-
display toe
software
move
Human Player
Context Diagram
A context diagram shows:
Data input to the system,
Output data generated by
the system,
External entities.
Context Diagram
Context diagram captures:
Various entities external to the system
and interacting with it.
Data flow occurring between the
system and the external entities.
The context diagram is also called
as the level 0 DFD.
Context Diagram
Establishes the context of
the system, i.e.
Represents:
Data sources
Data sinks.
Level 1 DFD
Examine the SRS document:
Represent each high-level function as
a bubble.
Represent data input to every high-
level function.
Represent data output from every
high-level function.
Higher Level DFDs
Each high-level function is separately
decomposed into subfunctions:
Identify the subfunctions of the function
Identify the data input to each subfunction
Identify the data output from each
subfunction
Data-
items Compute-
RMS
0
User result
Context Diagram
Example 1: RMS Calculating
Software
From a cursory analysis of
the problem description:
We can see that the system
needs to perform several
things.
Example 1: RMS Calculating
Software
Accept input numbers from
the user:
Validate the numbers,
Calculate the root mean square
of the input numbers
Display the result.
Example 1: RMS Calculating
Software
numbers
Read- Validate-
numbers numbers
0.1 0.2
Valid -
Data- numbers
items error
Display Compute-
0.4 rms
0.3
result RMS
Example 1: RMS Calculating
Software
Squared-
Calculate- sum
squared- Calculate-
sum mean
0.3.1 0.3.2
Valid - Mean-
numbers square
Calculate-
root
0.3.3
RMS
Example: RMS Calculating
Software
b
a c
Square Square Square
0.3.1.1 0.3.1.2 0.3.1.3
bsq
asq csq
Sum
0.3.1.4
Squared-sum
Example: RMS Calculating
Software
Decomposition is never carried
on up to basic instruction level:
A bubble is not decomposed any
further:
If it can be represented by a simple
set of instructions.
Data Dictionary
A DFD is always accompanied by a data dictionary.
c1
d1
a d
e
Level 1 d
e1
e
Level 2
Numbering of Bubbles
Number the bubbles in a DFD:
Numbers help in uniquely identifying any bubble from its
bubble number.
Bubbles at level 1:
Numbered 0.1, 0.2, 0.3, etc
Tic-tac-
toe
display software
0
move
Human Player
Level 1 DFD
game
Display-
move board
0.1 result
Validate- Check-
move winner
0.2 board 0.4
Play-
move
0.3
Data Dictionary
Display=game + result
move = integer
board = {integer}9
game = {integer}9
result=string
Summary
We discussed a sample function-oriented
software design methodology:
Structured Analysis/Structured Design(SA/SD)
Incorporates features from some important
design methodologies.
SA/SD consists of two parts:
Structured analysis
Structured design.
Summary
The goal of structured analysis:
functional decomposition of the system.
Results of structured analysis:
represented using Data Flow Diagrams
(DFDs).
We examined why any hierarchical
model is easy to understand.
Number 7 is called the magic number.
Summary
During structured design,
The DFD representation is
transformed to a structure chart
representation.
DFDs are very popular:
Because it is a very simple
technique.
Summary
A DFD model:
Difficult to implement using a
programming language:
Structure chart representation can be
easily implemented using a
programming language.
Summary
We discussed structured
analysis of two small
examples:
RMS calculating software
Tic-tac-toe computer game
software
Summary
Several CASE tools are available:
Support structured analysis and
design.
Maintain the data dictionary,
Check whether DFDs are balanced
or not.