24
© 2005 by Prentice Hall © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich

© 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

Embed Size (px)

Citation preview

Page 1: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall

Chapter 8 Structuring System Logical

Requirements

Modern Systems Analysisand Design

Fourth Edition

Jeffrey A. Hoffer Joey F. George

Joseph S. Valacich

Page 2: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-2

Learning ObjectivesUse structured English as a tool for

representing steps in logical processes in data flow diagrams.

Use decision tables and decision trees to represent logical choice in conditional statements.

Select among structured English, decision tables, and decision trees.

Page 3: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-3

Page 4: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-4

Logic Modeling

Data flow diagrams do not show the logic inside the processes.

Logic modeling involves representing internal structure and functionality of processes depicted on a DFD.

Logic modeling can also be used to show when processes on a DFD occur.

Page 5: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-5

Logic Modeling Deliverables and Outcomes

Structured English

Decision Tables

Decision Trees

State-transition diagrams

Sequence diagrams

Activity diagrams

Page 6: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-6

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

Page 7: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-7

Page 8: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-8

Structured English is used here to describe input and output.

Page 9: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-9

Structured English is used here to describe arithmetic operations.

Page 10: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-10

Structured English is used here to describe repetition.

Page 11: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-11

Structured English is used here to describe decisions.

Page 12: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-12

Structured English is used here to describe invoking other processes.

Page 13: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-13

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

Page 14: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-14

3 Parts of a Decision Table

1. Condition stubs Lists condition relevant to decision

2. Action stubs Actions that result from a given set of conditions

3. 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

Page 15: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-15

Procedure for Creating Decision Tables

Name the condition and values each condition can assumeName all possible actions that can occurList all rulesDefine the actions for each ruleSimplify the table

Page 16: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-16

Decision Table

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

Page 17: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-17

Reduced Decision Table

Because of indifferent condition, the complete decision table can be reduced to one with fewer rules

Page 18: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-18

Modeling Logic with Decision Trees

A graphical representation of a decision situation

Decision situation points are connected together by arcs and terminate in ovals

Main components Decision points represented by nodes Actions represented by ovals Particular choices from a decision point

represented by arcs

Page 19: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-19

Modeling Logic with Decision Trees (cont.)

Read from left to right

Each node corresponds to a numbered choice on a legend

All possible actions are listed on the far right

Page 20: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-20

Decision tree representation of salary decision

Page 21: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-21

Alternative decision tree representation of salary decision

Page 22: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-22

Deciding Among Structured English, Decision Tables, and Decision TreesCriteria Structured

EnglishDecision Tables

Decision Trees

Determining Conditions and Actions

Second Best Third Best Best

Transforming Conditions and Actions into Sequence

Best Third Best Best

Checking Consistency and Completeness

Third Best Best Best

Page 23: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-23

Deciding Between Decision Tables and Decision Trees

Criteria Decision Tables Decision Trees

Portraying complex logic

Best Worst

Portraying simple rules

Worst Best

Making decisions Worst Best

More compact Best Worst

Easier to manipulate

Best Worst

Page 24: © 2005 by Prentice Hall Chapter 8 Structuring System Logical Requirements Modern Systems Analysis and Design Fourth Edition Jeffrey A. Hoffer Joey F. George

© 2005 by Prentice Hall© 2005 by Prentice Hall8-24

Summary

In this chapter you learned how to: Use structured English as a tool for

representing steps in logical processes in data flow diagrams.

Use decision tables and decision trees to represent logical choice in conditional statements.

Select among structured English, decision tables, and decision trees.