Curtis & Cobham Ch 10 Revised by Ivor Perry Sept From Flow Charts to UML - 2
Curtis & Cobham Ch 10 Revised by Ivor Perry Sept Agenda Decision Tables Logic Flowcharts Structured English Data Flow Diagrams
Curtis & Cobham Ch 10 Revised by Ivor Perry Sept Decision Tables A way of thinking through processes which have already been decomposed Example: Insurance Claim Decision Pay out x Refusal - Letter A - x - - Refusal - Letter B - - x - Refusal - Letter C -- - x This type of Claim payable? YNYN Above Excess Limit?YNNY
Curtis & Cobham Ch 10 Revised by Ivor Perry Sept Decision Tables Advantages Every combination of conditions is tested There are 2 n ways in which the conditions can be combined –Where n = number of conditions Each outcome is predicted before the system is tested
Curtis & Cobham Ch 10 Revised by Ivor Perry Sept Decision Tables Advantages A clear tabular representation linking conditions with actions Ensure an exhaustive coverage of all possible cases Can show up redundancy and inconsistency in a set of rules Easy to follow in operation Can be incorporated into program specifications
Curtis & Cobham Ch 10 Revised by Ivor Perry Sept Decision Tables Disadvantages Can become very unwieldy Only suitable where there is little interleaving between the evaluation of conditions and execution of actions
Curtis & Cobham Ch 10 Revised by Ivor Perry Sept Logic Flowcharts In a complex decision making process, Decision Tables may have to be linked to many subsidiary Decision Tables Logic Flowcharts are designed to address this problem Flows do NOT represent data or documents: Flows represent the control of the process
Curtis & Cobham Ch 10 Revised by Ivor Perry Sept Logic Flowcharts Example: Insurance Claim Decision Yes start View documents Is this type of claim payable? Pay out stop Is it above the excess limit? No Send refusal C No Is it above the excess limit? Send refusal A No Yes Send refusal B
Curtis & Cobham Ch 10 Revised by Ivor Perry Sept Logic Flowcharts Advantages Easy to understand and follow Can be used in procedures manuals to follow a task Good at representing cases where there is an interleaving of actions and evaluations Can be used to specify programs
Curtis & Cobham Ch 10 Revised by Ivor Perry Sept Logic Flowcharts Disadvantages Encourage the use of GOTO statements in programming. Can lead to logic which is difficult to unravel Difficult and time - consuming to alter
Curtis & Cobham Ch 10 Revised by Ivor Perry Sept Structured English Process logic is described using 3 structures A sequential block of statements Decision structures, –the 2-way decision IF, THEN, ELSE –the multi-way decision CASE, CASE 1, CASE 2, CASE 3 Repetition structures –DO WHILE –REPEAT, UNTIL
Curtis & Cobham Ch 10 Revised by Ivor Perry Sept Structured English Example: Insurance Claim Decision fetch CLAIM fetch GARAGE_REPORT fetch POLICY_TYPE fetch POLICY_EXCESS CASE POLICY_TYPE, POLICY_EXCESS CASE 1 POLICY_TYPE=COMP, POLICY_EXCESS<CLAIM pay out CASE 2 POLICY_TYPE=3rdPF&T, POLICY_EXCESS>CLAIM send refusal letter A
Curtis & Cobham Ch 10 Revised by Ivor Perry Sept Data Flow Diagrams (DFDs) Identify the major processes Identify the major sources, sinks and stores Identify the major data flows Name the flows, processes, sources, sinks and stores Draw the diagram Review the diagram, checking for logical consistency
Curtis & Cobham Ch 10 Revised by Ivor Perry Sept Data Flow Diagrams (DFDs) Motor Insurance Claim customer Verification Garage Decide response customer response Temporary file Permanent file Focus on the logical model of the system Start with overview - Context diagram, or Level 0 Concerned with –what happens, –not how or where it happens Top down, then decompose
Curtis & Cobham Ch 10 Revised by Ivor Perry Sept Data Flow Diagrams (DFDs) Decomposition - Level 1 Verification Data entry customer Match to policy D1 Customer database Temporary file garage Inform Garage
Curtis & Cobham Ch 10 Revised by Ivor Perry Sept Data Flow Diagrams (DFDs) An important tool of structured analysis and design. Makes no commitment to physical design of the system. Data stores may become part of a database, and processes may become programs A DFD is readable by non-technical staff –may therefore become part of the agreed Requirements Specification
Curtis & Cobham Ch 10 Revised by Ivor Perry Sept End of Lecture