Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

Lab No 4

On
“Software Engineering”

Presented by: Under Guidance of :


Siddharth Kumar Dr. Jayadeep Pati
(PhD Scholar) (Assistant Professor)
Reg. No.: 2019DR005
Department of Computer Science and Engineering
Indian Institute of Information Technology, Ranchi
Outline
• Data Flow Diagram
• DFD Concepts
• Data Flow Model of a Car Assembly Unit
• Hierarchical Model
• Numbering of Bubbles
• Data Flow Diagrams (DFDs)
• Tic-tac-toe: Context Diagram
• Level 1 DFD
• Higher Level DFDs
• Decomposition
• Example 1: RMS Calculating Software
• Example 2: Tic-Tac-Toe Computer Game
• EXAMPLE 3: Online Banking System

2
Data Flow Diagram
● DFD is a hierarchical graphical
model:
– Shows the different functions (or
processes) of the system and
– Data interchange among the processes.

3
DFD Concepts
● It is useful to consider each function
as a processing station:
– Each function consumes some input
data.
– Produces some output data.

4
Data Flow Model of a Car
Assembly Unit
Engine Store Door Store

Partly
Assembled
Car
Fit Fit Fit Paint and
Engine Doors Wheels Test
Chassis with Assembled
Engine Car Car

Chassis Store Wheel Store

5
Hierarchical Model

6
Numbering of Bubbles
● Number the bubbles in a DFD:
– Numbers help in uniquely identifying any bubble from its
bubble number.
● The bubble at context level:
– Assigned number 0.
● Bubbles at level 1:
– Numbered 0.1, 0.2, 0.3, etc
● When a bubble numbered x is decomposed,
– Its children bubble are numbered x.1, x.2, x.3, etc.

7
Data Flow Diagrams (DFDs)
● Primitive Symbols Used for Constructing DFDs:

8
Tic-tac-toe: Context Diagram

Tic-tac-toe
display software

move
Human Player

9
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.

10
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
● These are represented as DFDs.

11
Decomposition
● Decomposition of a bubble:
– Also called factoring or exploding.

● Each bubble is decomposed to


– Between 3 to 7 bubbles.

12
Example 1: RMS Calculating
Software
● Consider a software called RMS
calculating software:
– Reads three integers in the range of -1000
and +1000
– Finds out the root mean square (rms) of the
three input numbers
– Displays the result.

13
Example 1: RMS Calculating
Software
● The context diagram is simple to
develop:
– The system accepts 3 integers from
the user
– Returns the result to him.

14
Example 1: RMS Calculating
Software
Data-
items Compute-
RMS
0

User result

Context Diagram

15
Example 1: RMS Calculating
Software
● From a cursory analysis of the
problem description:
– We can see that the system needs
to perform several things.

16
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.

17
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

18
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

19
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

20
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.

21
Example 2: Tic-Tac-Toe Computer
Game
● A human player and the computer make alternate
moves on a 3 X 3 square.
● A move consists of marking a previously unmarked
square.
● The user inputs a number between 1 and 9 to mark a
square
● Whoever is first to place three consecutive marks
along a straight line (i.e., along a row, column, or
diagonal) on the square wins.
22
Example: Tic-Tac-Toe Computer
Game
● As soon as either of the human player or the computer
wins,
– A message announcing the winner should be displayed.
● If neither player manages to get three consecutive
marks along a straight line,
– And all the squares on the board are filled up,
– Then the game is drawn.
● The computer always tries to win a game.

23
Context Diagram for Example

Tic-tac-
toe
display software
0

move
Human Player

24
Level 1 DFD
game
Display-
move board
0.1 result

Validate- Check-
move winner
0.2 board 0.4

Play-
move
0.3

25
EXAMPLE 3: Online Banking System
On-line banking system that provide customers with the facility to check their
accounts online and do transactions.
It will provide all facilities when their authentications match giving all update
information and bank details.
It will also support an online enrolment facility for credit card customers and
should allow customers to view their personnel accounts and to pay bills online
from their account.

26
DFD
DATA FLOW DIAGRAM (LEVEL 0)

Admin details
Login
Admin process
0

User details
User

27
DATA FLOW DIAGRAM (LEVEL-1)
DFD

Login Detail

Detail-info Detail-info

Admin User
Login Login
0.1 0.2

28
28
DATA FLOW DIAGRAM (LEVEL 2) DFD
(Admin)

User Detail_info
Admin details Validate Registration
admin 0.1.1

0.1
Response Detail_info
0.1.2

Admin details valid admin

Administrator

29
29
DFD
DATA FLOW DIAGRAM (LEVEL 3)
(User Registration)

User Data

0.1.1.1

User

Registration
Address
User details 0.1.1
0.1.1.2

Image

0.1.1.3

User details

30
30
DFD
DATA FLOW DIAGRAM (LEVEL 3) DATA FLOW DIAGRAM (LEVEL 3)
( User Registration) (User Registration)

User Address
User name, address added successfully
User Data contacts Added Successfully
,account
User
information Data 0.1.1.2

0.1.1.1
User Details
added successfully
User Details Added Successfully
User Details

User Details

31
31
DFD
DATA FLOW DIAGRAM (LEVEL 3) DATA FLOW DIAGRAM (LEVEL 2)
(User Registration) (Response)

Admin’s Response
User Image uploaded successfully User’s Query
image Response
0.1.1.3
0.1.2

User details uploaded successfully Response Query

User details User Details

32
32
Logged in successfully

DFD
DATA FLOW DIAGRAM (LEVEL 2)
(User)

Validate Logged in
User details successfully User Profile
User
0.2.1
0.2

User details
valid User

Administrator

33
33
DFD
DATA FLOW DIAGRAM (LEVEL 3)
(User)

Edit Profile

0.2.1.1

User
User details
Profile
0.2.1

Money
Transfer

0.2.1.2
User details

34
34
DFD
DATA FLOW DIAGRAM (LEVEL 3)
(User)

User details
Edit
Edited successfully User Profile
Profile
0.2.1
0.2.1.1

User details
valid User

Administrator

35
35
DFD
DATA FLOW DIAGRAM (LEVEL 3)
(User)

Users details Money Transferred successfully


Transfer
0.2.1.2 Account Updated

Account details User’s Account

User’s Account

36
36
Assignment -1
• Perform all three examples in your laptop using visio and submit your
assignment on or before 17/03/22.

37

You might also like