dfd and flowchart
DESCRIPTION
TRANSCRIPT
DFD Symbology
DeMarco-YourdonSymbology
Gane-SarsonSymbology
Examples
Process
Data Store
Entity
Data Flow
6.1
CreateEmployee
PayrollCheck
Customer
New Customer Information
InventoryFile
D7
DFD for Peeling an Apple
1.0
GetApple
AppleStorageS1
Peeling DeviceStorageS2
2.0
GetPeelingDevice
4.0
HoldApple
3.0
WashApple
6.0
DiscardPeel
5.0
Peel AppleWith
Peeling Device
7.0
Send PeeledApple
ToProcessor
PeelDisposalS2
ProcessedApple
System
Unwashed Apple
Unwashed Apple
Washed Apple Washed Apple
Peeling Device
Peeling Device Apple Peel
Apple Peel
Peeled ApplePeeled Apple
Context-Level Diagram
0
EmployeePayrollSystem
Employee Tax Form
Payroll Report
Time Sheet
Employee Payroll Check
Employee
Accounting Department
Level-0 DFD
1.0
CreateWeeklyPayrollRecord
Employee Data File
S1Employee Payroll Data File
S2
2.0
ComputeWeekly
Paycheck
3.0
PrepareWeeklyPayroll
Summary
4.0
PrepareEmployee
TaxForm
AccountingDepartment
Employee Record Paycheck Data
Payroll Record
Payroll Report
Employee Paycheck
Employee Tax Form
Time Sheet
Hours Worked
Employee Payroll Record
Level-1 DFD
1.0
CreateWeeklyPayrollRecord
Employee Data FileS1
Employee Tax Form
Payroll Data FileS2
2.1
ComputeGross
Pay
2.3
CreatePayrollCheck
2.2
ComputeNetPay
3.2
PrintWeeklyPayroll
Summary
3.1
SortPayroll
Records byEmployee
4.2
PrintEmployee
TaxForm
4.1
CalculatePayroll
Deductions
Employee Paycheck
PayrollDeductions
Employee PayrollRecord
Time Sheet
Employee Record
Gross PayData
Net PayData
Hours Worked
Payroll Record
Sorted Records
Payroll Report
Employee
Accounting Department
Partial Level-n DFD
4.1.2
CalculateNon-tax
Deductions
4.1.3
CalculateRetirementAllowance
4.2.1
CalculateEmployeeVacation
Pay
4.1.1
CalculatePayroll
TaxDeductions
4.2.2
PrintEmployeeTax Form
EmployeeData
EmployeeData
EmployeeData
Employee Tax Form
EmployeePayrollRecord
Employee Data
Rules Governing DFD Construction
• A process cannot have only outputs – “Miracle.”• A process cannot have only inputs – “Black Hole.”• The inputs to a process must be sufficient to produce the outputs from the
process - (Gray Hole).• All data stores must be connected to at least one process.• A data store cannot be connected to a source or sink. • A data flow can have only one direction of flow. Multiple data flows to and/or
from the same process and data store must be shown by separate arrows. • If the exact same data flows to two separate processes, it should be
represented by a forked arrow. • Data cannot flow directly back into the process it has just left. • All data flows must be named using a noun phrase.
ANSI Flowchart Symbology
Program
LibraryProgram
ManualOper.
Punch Card
SourceDocument
MultipleDocuments
TapeFile
Disk File
Database
Sort
Extract
MergeDecisio
nTermination
System Flowchart
Order-EntryDept.
MemberOrders
InputMemberOrders
MemberOrders
Member OrderEdit
ProgramValid
Orders
Sort by #
SortedMember Orders
Member Order Error
Report
Correct
OrderErrors
Functional Primitive
4.1.2
CalculateNon-tax
Deductions
4.1.3
CalculateRetirementAllowance
4.2.1
CalculateEmployeeVacation
Pay
4.1.1
CalculatePayroll
TaxDeductions
4.2.2
PrintEmployeeTax Form
EmployeeData
EmployeeData
EmployeeData
Employee Tax Form
EmployeePayrollRecord
Employee Data
Non-Probabilistic Decision Tree
ProcessName
Condition 1 (true)
Condition 2 (false)
Condition 1 (false)
Condition 2 (true)
Condition 2 (false)
Condition 2 (true)
1
2
2
Action 1
Action 2
Action 3
Action 4
Decision Tree Example
SurchargeRating
< 25 yrs.
No
25 yrs. +
Yes
1
2
2
10%
20%
7%
0%Yes
3
4
5
6
F
M15%
12%
10%
7%
No
Yes No
Yes< 3.25
3.25+
DriverAge
AccidentFree
DriverGender
Driver’sEduc.
CollegeEduc.
H.S.GPA
Surcharge
State-Transition Diagram
State
TransitionErrorState
2. OperatingState
1. IdleState
S5. MajorError
Cleared
S1. ON buttonPushed
S3. ErrorConditionDetected
S2. OFF buttonpushed
S4. MinorError
Cleared
Problem 1 DFD
1.0 2.0
3.0
Insurance Claimant
Insurance Claimant
Claims ManagerClaims
Manager
Home OfficeHome Office
Claims File
Verify Claim
Review Client
History
Issue Claim
Payment
InsuranceClaim
InsuranceClaim
Claim Payment
Amount Paid
Monthly ClaimsAnalysis
ClaimsReport
Structured English for Process 4.x
Process ID
Structured English
4.1.1
Multiply GROSS_PAY by FED_TAX_RATE and store in EMP_TAX_DEDUCT.
4.1.2
IF EMP_NONTAX_DEDUCT > 0 THEN append EMP_NONTAX_DEDUCT to employee data.
4.1.3
Multiply GROSS_PAY by .01 and store in EMP_RETIRE.
4.1.4
Multiply CURR_EMP_VACATION by EMP_DAY_RATE and store in EMP_VACATION_PAY.