Week 3 - OOAD - Functional Modelling
Week 3 - OOAD - Functional Modelling
WEEK 3 & 4
FUNCTIONAL MODELLING
defines:-
are derived when they are computed, or why they need to be computed.
the processing upon the inputs, the outputs of the system as well as the
1|Page
computations performed on the objects or the system, and the external
Definition - “A data flow diagram is a graph which shows the flow of data
values from their sources in objects through processes that transform them
- Processes
- Data Flows
- Actors
- Data Stores
- Constraints, and
- Control Flows.
2|Page
FEATURES OF A DFD
a) Processes
simple function.
name written inside it and contains a fixed number of input and output data
values.
integer_b and outputs their HCF (highest common factor) and LCM (least
common multiple).
3|Page
b) Data Flows
Data flow represents the flow of data between two processes. It could be
between an actor and a process, or between a data store and a process. A data
flow denotes the value of a data item at some point of the computation. This
arrow, labeled with the name of the data item that it carries.
In the above figure, Integer_a and Integer_b represent the input data flows
to the process, while L.C.M. and H.C.F. are the output data flows.
4|Page
- The output value is sent to several places as shown in the following
figure. Here, the output arrows are unlabeled as they denote the same
value.
- The data flow contains an aggregate value, and each of the components
c) Actors
Actors are the active objects that interact with the system by either producing
data and inputting them to the system, or consuming data produced by the
system. In other words, actors serve as the sources and the sinks of data.
connected to the inputs and outputs and lie on the boundary of the DFD.
Example: The following figure shows the actors, namely, Customer and
Data stores are the passive objects that act as a repository of data. Unlike
actors, they cannot perform any operations. They are used for data storage
and retrieval of the stored data. They represent a data structure, a disk file,
or a table in a database.
containing the name of the data store. Each data store is connected to at least
one process.
Input arrows contain information to modify the contents of the data store,
while output arrows contain information retrieved from the data store. When
6|Page
Example: The figure below shows:-
- Input to the data store comprises of details of sales such as item, billing
- To find the average sales, the process retrieves all the required sales
e) Constraints
over time. They allow adding new rules or modifying existing ones.
objects. They may also define the relationship between the different
7|Page
- In Dynamic Modeling, the constraints define the relationship between
braces.
Example: The following figure shows a portion of DFD for a payroll system
of a company that has decided to give incentives to all employees of the sales
8|Page
f) Control Flows
only if the value is true, though it is not a direct input to the process. These
line from the process producing the Boolean value to the process controlled
by them.
The Divisor is tested for non-zero. If it is not zero, the control flow OK has
a value True and subsequently the Divide process computes the Quotient and
the Remainder.
9|Page
DEVELOPING A DFD MODEL OF A SYSTEM
process is decomposed into sub-processes, the data flows among the sub-
processes are identified, the control flows are determined, and the data
Note:
While decomposing a process, the data flow into or out of the process should
transactions of a wholesale shop. The shop sells in bulk and has a clientele
10 | P a g e
C_Code. Once a sale is done, the shop registers its details and sends the
Each year, the shop distributes Christmas gifts to its customers, which
comprise of a silver coin or a gold coin depending upon the total sales and
The functional model for the Wholesale Software below shows the top-level
DFD illustrating the software as a single process and the actors that interact
- Customers
- Salesperson
- Proprietor
11 | P a g e
In the next level DFD, as shown in the following figure below, the major
processes of the system are identified, the data stores are defined and the
interaction of the processes with the actors and the data stores are
established.
- Register Customers
- Process Sales
- Ascertain Gifts
- Customer Details
- Sales Details
- Gift Details
12 | P a g e
DECOMPOSITION OF THE PROCESSES ILLUSTRATION
The following figure shows the details of the process Register Customer.
There are three processes in it, Verify Details, Generate C_Code, and Update
Customer Details. When the details of the customer are entered, they are
verified. If the data is correct, C_Code is generated and the data store
Gifts. It has two processes in it, Find Total Sales and Decide Type of Gift
Coin. The Find Total Sales process computes the yearly total sales
corresponding to each customer and records the data. Taking this record and
the decision of the proprietor as inputs, the gift coins are allotted through
Advantages Disadvantages
14 | P a g e
DFDs provide detailed information The preparation of DFDs is a
about the System processes. complex process that needs
considerable expertise.
They are used as a part of the system Also, it is difficult for a non-
documentation. technical person to understand.
The method of preparation is
subjective and leaves ample scope
to be imprecise.
The Object Model, the Dynamic Model, and the Functional Model
do.
15 | P a g e
a) Functional Model and Object Model
The four main parts of a Functional Model in terms of object model are:
implemented.
- Data Stores: These are either objects in the object model and contain
attributes of objects.
updates.
- States how they are performed and which arguments are needed.
As actors are active objects, the dynamic model must specify when they act.
16 | P a g e
The data stores are passive objects and they only respond to updates and
queries; therefore the dynamic model need not specify when they act.
- Shows the status of the objects and the operations performed on the
- The state of the object as a result of the changes as shown in the object
model
- Feasibility Study
- System Design
- Implementation
17 | P a g e
- Post-implementation Review
18 | P a g e
in systems following structured
analysis.
19 | P a g e