Logic Modeling ch5 pp.173180 - PowerPoint PPT Presentation

1 / 23
About This Presentation
Title:

Logic Modeling ch5 pp.173180

Description:

Representing the details of the processes that have been identified during process modeling. During Analysis, logic modeling is detailed but generic. ... – PowerPoint PPT presentation

Number of Views:74
Avg rating:3.0/5.0
Slides: 24
Provided by: joeval3
Category:
Tags: ch5 | logic | modeling

less

Transcript and Presenter's Notes

Title: Logic Modeling ch5 pp.173180


1
Logic Modeling(ch5 pp.173-180)
  • MIS 322

2
Logic Modeling
  • Representing the details of the processes that
    have been identified during process modeling.
  • During Analysis, logic modeling is detailed but
    generic.
  • Used as a communication tool between users,
    analysts, and programmers

3
Logic Modeling Approaches
  • Structured English to represent process logic
  • Decision Tables

4
Structured English a technique for representing
the "processing" contents of a DFD process
  • modified form of English used to represent
    process details
  • Strong verbs to describe process action
  • read, write, print, sort, move, merge, add,
    subtract, multiply, divide
  • Basically, pseudo code to describe each process
    bubble at the functional primitive level
  • There is no right way to write pseudo code. Just
    have a method and be consistent throughout
    document

5
Structured English
  • Example...
  • Show processing logic for a bank's service charge
    calculation
  • Process Calculate Customer Service Charge

6
Example of one form of the process
  • READ summary of customer monthly balances
  • BEGIN IF
  • IF daily-balance is lt 300 for any given day
  • THEN set service-charge to 5
  • ELSE set service-charge to 0
  • END IF

7
More complex example that includes account type
  • READ customer account-type and summary of
    customer monthly balances
  • SELECT CASE
  • CASE 1 (account-type is NOW)
  • BEGIN IF
  • IF daily-balance lt 300 for any given day
  • THEN set service-charge to 5
  • ELSE set service-charge to 0
  • END IF
  • CASE 2 (account-type is REGULAR)
  • BEGIN IF
  • IF daily-balance lt 100 for any given day
  • THEN set service-charge to greater of 3 or
    .20 times number-checks
  • ELSE set service-charge to 0
  • END IF
  • END CASE

8
Three Parts to Structured Programs
  • Sequence
  • Conditions
  • Repetition
  • Sequence we show by just listing things top to
    bottom in descending order
  • Conditions and Repetition we show just like in a
    Visual Basic subprocedure

9
CONDITIONAL STATEMENTS
  • Conditions IF/THEN/END IF SELECT CASE / END
    CASE (or END SELECT if you like)
  • BEGIN IF
  • IF Quantity-in-stock is less than
    Minimum-order-quantity
  • THEN GENERATE new order
  • ELSE DO nothing
  • END IF

10
CONDITIONAL STATEMENTS
  • READ Quantity-in-stock
  • SELECT CASE
  • CASE 1 (Quantity-in-stock greater than
    Minimum-order-quantity)
  • DO nothing
  • CASE 2 (Quantity-in-stock equals
    Minimum-order-quantity)
  • DO nothing
  • CASE 3 (Quantity-in-stock is less than
    Minimum-order quantity)
  • GENERATE new order
  • CASE 4 (Stock out)
  • INITIATE emergency re-order routine
  • END CASE

11
REPETITION
  • DO
  • READ Inventory records
  • BEGIN IF
  • IF Quantity-in-stock is less than
    Minimum-order-quantity
  • THEN GENERATE new order
  • ELSE DO nothing
  • END IF
  • UNTIL End-of-file

12
REPETITION
  • READ Inventory records
  • WHILE NOT End-of-File DO
  • BEGIN IF
  • IF Quantity-in-stock is less than
    Minimum-order-quantity
  • THEN GENERATE new order
  • ELSE DO nothing
  • END IF
  • END DO

13
Misc. Info on Structured English
  • Indent just like in programming to signify groups
    of processes
  • Suggestions
  • All caps for programming keywords
  • cap first letter in nouns
  • hyphenate phrases
  • Write out conditions (less than instead of lt
    )
  • Dont do tech details like initialize variables,
    etc.
  • Note Figure 5-14 and 5-15 in the book are only
    appropriate if level 0 is also the functional
    primitive level

14
DECISION TABLES
  • a matrix representation of the logic of a
    decision
  • CONDITION STUBS
  • The part of a decision table that lists the
    conditions relevant to the decision.
  • ACTION STUBS
  • The part of a decision table that lists the
    actions that result for a given set of
    conditions.
  • RULES
  • The part of a decision table that specifies which
    action items are to be followed for a given set
    of conditions.

15
Condition Stubs
Action Stubs
16
CONSTRUCTING DECISION TABLES
  • 1. Name the conditions and the values each
    condition can assume
  • 2. Name all possible actions that can occur
  • 3. List all possible rules
  • 4. Define the actions for each rule
  • 5. Simplify the decision table by removing any
    rules with impossible actions or with
    indifferent conditions

17
INDIFFERENT CONDITION
  • In a decision table, a condition whose value does
    not affect which actions are taken for two or
    more rules.
  • Example follows this slide for reducing table by
    taking out extra columns for salaried employees

18
(No Transcript)
19
(No Transcript)
20
The next 2 slides are from the book. Lets work
through reducing figure 5-18 into figure 5-19
21
Complete decision table for inventory reorder
system (fig. 5-18)
22
Reduced decision table for inventory reorder
system (fig. 5-19)
23
When to use Structured English and when Decision
Tables?
  • Use the one that is more clear or use both in
    combination
  • The point is to communicate to the developers and
    the client
Write a Comment
User Comments (0)
About PowerShow.com