Sie sind auf Seite 1von 24

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.

Due
Invoices

Sorted
Invoices

Invoices
4.1
Sort Invoice
by Date

4.2
Scan for
due
invoices

Payments
4.3
Generate
Payments
for Due
Invoices

Chapte 8

Chapter 8

2008 by Prentice Hall

16

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 sametherefore 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

More dimensions?

Note: for salaried employees the action stub chosen will always
be the sametherefore hours worked is an indifferent condition

Decision Tables

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

Chapter 8

2008 by Prentice Hall

24

Das könnte Ihnen auch gefallen