1 Decision Tables. 2  Introduction  construction  Types of Decision Tables  Limited Entry  Extended Entry  Combining of Rules  General Rule  Q.

Slides:



Advertisements
Similar presentations
Preparing a Decision Table
Advertisements

Chapter 11 Describing Process Specifications and Structured Decisions
CSC 123 Systems Analysis & Design
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
Copyright © Cengage Learning. All rights reserved.
Concepts of Database Management Sixth Edition
Copyright © 2011 Pearson Education, Inc. Publishing as Prentice Hall Process Specifications and Structured Decisions Systems Analysis and Design, 8e Kendall.
System Concepts for Process Modeling  Process Concepts  Process Logic  Decomposition diagrams and data flow diagrams will prove very effective tools.
Chapter 9 Describing Process Specifications and Structured Decisions
Chapter 9 Describing Process Specifications and Structured Decisions Systems Analysis and Design Kendall & Kendall Sixth Edition © 2005 Pearson Prentice.
Lecture 2 Dr Richard Reilly Dept. of Electronic & Electrical Engineering Room 153, Engineering Building To insert your company logo on this slide From.
Chapter 9 Describing Process Specifications and Structured Decisions
Chapter 2 – Combinational Logic Circuits Part 1 – Gate Circuits and Boolean Equations Logic and Computer Design Fundamentals.
Chapter 4 Gates and Circuits.
Kendall & KendallCopyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall 9 Kendall & Kendall Systems Analysis and Design, 9e Process Specifications.
Copyright © Cengage Learning. All rights reserved.
Lecture 3. Boolean Algebra, Logic Gates
Table of Contents Matrices - Multiplication Assume that matrix A is of order m  n and matrix B is of order p  q. To determine whether or not A can be.
Database Design IST 7-10 Presented by Miss Egan and Miss Richards.
Logic Gates Circuits to manipulate 0’s and 1’s. 0’s and 1’s used for numbers Also to make decisions within the computer. In that context, 1 corresponds.
Kendall & KendallCopyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall 9 Kendall & Kendall Systems Analysis and Design, 9e Process Specifications.
Lecture 3. Boolean Algebra, Logic Gates Prof. Sin-Min Lee Department of Computer Science 2x.
1. Copyright © 2006 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Systems of Equations CHAPTER 9.1Solving Systems of Linear Equations Graphically.
CSCI 347 / CS 4206: Data Mining Module 03: Output Topic 02: Decision Tables.
7th Grade Math Final Review (20 % of Semester Grade)
Chapter 4 Gates and Circuits.
Digital Systems Presented by Prof Tim Johnson
3/5/2009Computer systems1 Describing Process Specifications and Structured Decisions 1. Process specifications sometimes called mini-specs 2. Structured.
INTRODUCTION TO PROGRAMMING STRUCTURE Chapter 4 1.
Computer Arithmetic Nizamettin AYDIN
Chapter 9 Describing Process Specifications and Structured Decisions
Programming Logic and Design Fourth Edition, Introductory
Computer Science 1000 Digital Circuits. Digital Information computers store and process information using binary as we’ve seen, binary affords us similar.
Chapter 4 Gates and Circuits.
Boolean Algebra – the ‘Lingua Franca’ of the Digital World The goal of developing an automata is based on the following (loosely described) ‘ideal’: if.
Chapter 11 Describing Process Specifications and Structured Decisions Systems Analysis and Design Kendall and Kendall Fifth Edition.
Chapter 9 Designing Databases Modern Systems Analysis and Design Sixth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich.
Question 10 What do I write?. Spreadsheet Make sure that you have got a printout of your spreadsheet - no spreadsheet, no marks!
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
For Wednesday No new reading Complete WebCT quiz.
Selection Control Structures. Simple Program Design, Fourth Edition Chapter 4 2 Objectives In this chapter you will be able to: Elaborate on the uses.
Computer Aided Process Planning (CAPP). What is Process Planning? Process planning acts as a bridge between design and manufacturing by translating design.
Structured Analysis.
Simulation is the process of studying the behavior of a real system by using a model that replicates the behavior of the system under different scenarios.
Year 6 Block A. 6A1 I can solve practical problems that involve number, place value and rounding. I can compare and order number to at least 10,000,000.
CSC 240 (Blum)1 Introduction to Access CSC 240 (Blum)2 Click on the Access desktop icon or go to Start/All Programs/Microsoft Office/Microsoft Office.
Revision Mid 1 Prof. Sin-Min Lee Department of Computer Science.
Algebra Problems… Solutions Algebra Problems… Solutions © 2007 Herbert I. Gross Set 16 By Herbert I. Gross and Richard A. Medeiros next.
For Wednesday No reading No homework. Exam 1 Wednesday night STV pm Sign up if you need to take a make-up (after clearing it with me)
Programming Logic and Design Fourth Edition, Comprehensive Chapter 5 Making Decisions.
ECE DIGITAL LOGIC LECTURE 15: COMBINATIONAL CIRCUITS Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2015, 10/20/2015.
Copyright © 2011 Pearson Education Process Specifications and Structured Decisions Systems Analysis and Design, 8e Kendall & Kendall Global Edition 9.
Decision Tables and Pseudocode
Week 1: Introduction and Logic gates IT3002 – Computer Architecture
IS 334 information systems analysis and design
Basics of Logic gates - Part 1
Morgan Kaufmann Publishers
Decision Table Testing
Year 6 Block A.
Process Specifications and Structured Decisions
AS Computer Studies Finite State Machines 2.
CS105 Introduction to Computer Concepts GATES and CIRCUITS
Computer Aided Process Planning
Describing Process Specifications and Structured Decisions
Chapter 11 Describing Process Specifications and Structured Decisions
Decision Tables SEEM 3430 Tutorial LI Jing.
Table Lookup Illustrated with Product Stress Testing
Decision Tables SEEM 3430 Tutorial Lanjun Zhou.
Presentation transcript:

1 Decision Tables

2  Introduction  construction  Types of Decision Tables  Limited Entry  Extended Entry  Combining of Rules  General Rule  Q & A

3  Some programs require solution using multiple decisions to produce the correct output.  This can be a difficult task as this is not always readily apparent  Decision Tables is a problem-analysis tool used to solved complex decision logic  Decision tables offer a complete, concise and logical way of relating combinations of actions to combinations of conditions

4  all appropriate conditions must be satisfied before the conclusion is drawn and the specified action or actions taken  The basic concept of the decision table is therefore the IF…and IF…THEN… relationship.  Decision Table is constructed before flow chart or structure chart is drawn

5  The four basic elements of the decision table are known as:  The condition stub  The condition entries/rules  The action stub  The action entries Condition stub Condition entries Action stub Action entries Decision Tables Quadrants

6  The condition stub describe the conditions to be tested  Condition entries describes the possible combination of Boolean values (Yes/No or simply Y/N) for the conditions  The action stub contains possible actions based on the conditions  and action entries describe the actions to be taken which correspond to each Boolean value of each condition.

7  Steps  List all possible conditions  Determine how many possible Boolean values combinations/rules. Since each condition has 2 outcomes (T/F), therefore the number of rules is determined by 2 n where n is the number of conditions e.g. with 3 conditions, there must be 6 rules - boolean columns 3. List all possible actions  For each rule, select the appropriate action/s. Indicate with ‘X’ or tick.

8  Consider the following simple logical situation  If it is cold and wet, I will take my sweater and umbrella.  If it is cold, I will take my sweater.  If it is wet, I will take my umbrella.  If it is neither cold nor wet, I will take neither.

9  STEP 1 : List all possible conditions  Is it cold?  Is it wet?  STEP 2 : Determine how many possible Boolean values combinations/rules  Conditions - 2  Thus rules = 2 2, which is 4

10 State of weatherRule 1Rule 2Rule 3Rule 4 Yes No Yes No Condition entries Condition stub Is it cold? Is it wet?

11  STEP 3 : List all possible actions  Take sweater  Take umbrella  Take neither

12  STEP 4 : For each rule, select the appropriate action/s indicated by ‘X’ or tick. The situation is expressed in a decision table as follows: State of weatherRule 1Rule 2Rule 3Rule 4 Is it cold? Is it wet? Yes No Yes No Take sweater Take umbrella Take neither Action stub Action entries

13  2 Types:-  Limited Entry Table  Extended Entry Table

14  expresses each condition in the condition stub as a question which can be answered ‘Yes’ or ‘No’ (2 states) – indicated by Y/N  If condition is inapplicable for any particular rule, entry is indicated by a dash/blank  The number of condition rules required is determine by the formula 2 n

15  Determine the rate of discount allowed and whether or not there is free delivery according to the purchaser and/or type of purchase. If the goods are assumed to be televisions with either 23 or 29 inches screens, dealers being approved or non-approved and the sets themselves being either walnut or plastic finish, solve the problem using a decision table if: 1.Non-approved dealers are allowed 5% discount. 2.Approved dealers are allowed – a.free delivery on 29 inch sets b.25% discount on 29 inch walnut c.20% on other sets

16 Discount Rule 1 Rule 2 Rule 3 Rule 4 Rule 5 Rule 6 Rule 7 Rule 8 Approved dealer?YYYYNNNN Walnut finish?YYNNYYNN 29” screen?YNYNYNYN 5% discountXXXX 20% discountXXX 25% discountX Free deliveryXX

17  Also known as Mixed Entry Table.  Used when the condition entry contains not a straight forward ‘Yes’ or ‘No’ answer  For example, a condition might be ‘DIRECTION’ and the condition entries ‘North’, ‘South’, ‘East’ and ‘West’.

18  The number of condition rules required is determine by the multiplying the number of outcome of each conditions.  E.g. condition1 has 2 outcome (Y/N) condition2 has 3 outcome (100,200,300) condition3 has 2 outcome (Y/N) Therefore no. of rules required 2x3x2 = 12 rules

19  An order will be approved if a guarantee is available and credit is $100, or if there is no guarantee but credit is $200 in which case special clearance does not apply, or if credit is $100, there is no guarantee and special clearance is given, or if credit is $300, there is no guarantee and no special clearance. If there is no guarantee, credit is $100 and special clearance is not given, the order is not approved and is returned to the client.

20 Order approval Guarantee?YYYYYYNNNNNN Credit? Special clearance? YNYNYNYNYNYN PassXXXX ReturnX

21  If, for any combination of rules, the condition entries are identical except for one row and the action entries are also identical, the two rules can be combined, a dash being inserted in place of the conditions which are not the same.

22  It is possible to combine rules if they are having the same actions.  E.g.  If it is cold or wet, I will take my jacket Weather 1Rule 1Rule 2Rule 3Rule 4 Is it cold? Is it wet? Yes No Yes No Take jacket Take nothing XX X X

23  It will be noted that for rules 1 and 2 in which the status of the first condition is Yes, the status of the second is immaterial. The action to be taken is the same whether the answer is Yes or No. This is indicated by a dash.  The new table will be: Weather 2Rule 1Rule 2Rule 3 Is it cold? Is it wet? Yes - No Yes No Take jacket Take nothing XX X

24  The new table for the problem on “Discount” is: DiscountRule 1Rule 2Rule 3Rule 4 Approved dealer?YYYN Walnut finish?Y-NN 29” screen?YNYN 5% discountX 20% discountXX 25% discountX Free deliveryXX

25  A carpenter needs a program that computes the price of any desk a customer orders based on the following input fields; order number, desk length in inches and width in inches (3 digits each, no decimals), type of wood (assumed valid type is entered), and a number of drawers (2 digits). The price is computed as follows:  The charge for all desk minimum is $200  If the surface area is over 750 sq. in., add $50  If the wood is “mahogany” add $150; for “oak” add $125. No charge is added for “pine”  For every drawer in the desk, there is an additional $30 charge