DFD Symbology 6.1 Create Process Employee Payroll Check Inventory Data Store D7 File Entity Customer Data Flow New Customer InformationDeMarco-Yourdon Gane-Sarson Examples Symbology Symbology
DFD for Peeling an Apple Apple Peeling Device PeelS1 S2 S2 Storage Storage DisposalUnwashed Apple Peeling Device Apple Peel 1.0 2.0 6.0 Peeling Device Apple Peel Get Get Discard Apple Peeling Peel Device 5.0 Peel Apple Unwashed Apple With Processed Peeling Device Apple System 3.0 4.0 7.0 Wash Hold Send Peeled Apple Apple Apple Washed Apple Washed Apple Peeled Apple To Processor Peeled Apple
Context-Level Diagram Employee Tax FormEmployee 0 Payroll Report Time Sheet Employee Payroll System Employee Payroll Check Accounting Department
Level-0 DFD 2.0 Employee Record Paycheck Data Employee Compute PayrollEmployee S1 S2 Data File Weekly Data File Paycheck Payroll Record Hours Worked 1.0 3.0 Employee Payroll Record Time Sheet Create Prepare Weekly Weekly Payroll Employee Paycheck Payroll Record Summary Payroll Report 4.0 Prepare Employee Tax Form Employee Tax Accounting Form Department
Level-1 DFD Employee Record S1 Employee Data File S2 Payroll Data FileEmployee Payroll Record 2.1 2.2 2.3 Hours Worked Gross Pay Net Pay Compute Compute Create 3.1 Data Data Gross Net Payroll Sort 1.0 Pay Pay Check Payroll Create Records by Weekly Employee Time Sheet Payroll Record Sorted Records Employee Paycheck 3.2 Print Weekly 4.2 4.1 Payroll Summary Print Calculate Employee Payroll Employee Payroll Payroll Report Employee Tax Form Payroll Tax Deductions Record Deductions Form Accounting Department
Partial Level-n DFD 4.1.1 Employee Payroll Calculate Record Payroll TaxEmployee Tax Form Deductions Employee Data 4.2.2 4.2.1 4.1.3 4.1.2 Employee Employee Employee Data Data Data Print Calculate Calculate Calculate Employee Employee Retirement Non-tax Tax Form Vacation Allowance Deductions Pay
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 Punch Card Tape Sor Program File t Source Library Document Program Disk File Manual Multiple Documents Extrac Oper. t Merg Decisio Database eTermination n
System Flowchart Order- Entry Dept. CorrecMember tOrders Order Errors Member Input Order ErrorMember ReportOrders Member Order Sorted Edit Valid Sort MemberMember Program Orders by # Orders Orders
Functional Primitive 4.1.1 Employee Payroll Calculate Record Payroll TaxEmployee Tax Form Deductions Employee Data 4.2.2 4.2.1 4.1.3 4.1.2 Employee Employee Employee Data Data Data Print Calculate Calculate Calculate Employee Employee Retirement Non-tax Tax Form Vacation Allowance Deductions Pay
Decision Tree Example Driver Accident Driver Driver’s College H.S. Surcharge Age Free Gender Educ. Educ. GPA 3.25+ 7% 6 Yes 10% < 3.25 5 Yes No 12% 4 15% M No 3 10% Yes < 25 yrs. F 2 20%Surcharge 1 No Rating 7% 2 25 yrs. + Yes 0%
State-Transition Diagram S1. ON button Pushed S2. OFF button State 1. Idle pushed 2. Operating State State S4. Minor Error S5. Major S3. Error Cleared Error Condition Cleared Detected ErrorTransition State
Structured English for Process 4.xProcess Structured English ID 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.