lecture.06.edited
TRANSCRIPT
Structuring System Logic Requirements
From DFD, ... We need a mechanism to model logic inside
processes.
Decomposition itself is not enough
How are the input converted into output?
Logic Modeling Deliverables and Outcomes Structured English Decision Tables
Meant for users, analyst and programmers
Modeling Logic with Structured English
Modified form of English used to specify the logic of information processes
Uses a subset of English Action verbs Noun phrases No adjectives or adverbs
No specific standards
Modeling Logic with Structured English Covers all three processes typical of
structured programming:
sequence, conditional statement, and repetition
Guidelines File names are connected with hyphens File name and variable names are capitalized Terms that signify logical comparisons are
spelled out. Commands are capitalized.
Structured English is used here to describe input and output.
Structured English is used here to describe arithmetic operations.
Structured English is used here to describe repetition.
Structured English is used here to describe decisions.
Structured English is used here to describe invoking other processes.
4.1
Sort Invoiceby Date
4.2
Scan for due invoices
4.3
GeneratePaymentsfor Due Invoices
InvoicesSorted Invoices
Due Invoices
Payments
Chapte 8
© 2008 by Prentice Hall 16Chapter 8
Modeling Logic with Decision Tables
A matrix representation of the logic of a decision
Specifies the possible conditions and the resulting actions
Best used for complicated decision logic
Decision Table Example
Note: for salaried employees the action stub chosen will always be the same…therefore hours worked is an indifferent condition
3 Parts of a Decision Table
Condition stubs Lists condition relevant to decision
Action stubs Actions that result from a given set of conditions
Rules Specify which actions are to be followed for a given set of
conditions
Indifferent Condition Condition whose value does not affect which action is
taken for two or more rules
Procedure for Creating Decision Tables
Name the condition and values each condition can assume
Name all possible actions that can occur List all rules Define the actions for each rule Simplify the table
Decision Table
Note: for salaried employees the action stub chosen will always be the same…therefore hours worked is an indifferent condition
More dimensions?
Decision Tables
© 2008 by Prentice Hall 24Chapter 8
Deciding Among Structured English and Decision Tables
Criteria Structured English
Decision Tables
Determining Conditions and Actions
Second Best Third Best
Transforming Conditions and Actions into Sequence
Best Third Best
Checking Consistency and Completeness
Third Best Best