lecture.06.edited

24
Structuring System Logic Requirements

Upload: tamer-abu-alzenat

Post on 06-Aug-2015

24 views

Category:

Art & Photos


1 download

TRANSCRIPT

Page 1: Lecture.06.edited

Structuring System Logic Requirements

Page 2: Lecture.06.edited
Page 3: Lecture.06.edited

From DFD, ... We need a mechanism to model logic inside

processes.

Decomposition itself is not enough

How are the input converted into output?

Page 4: Lecture.06.edited

Logic Modeling Deliverables and Outcomes Structured English Decision Tables

Meant for users, analyst and programmers

Page 5: Lecture.06.edited

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 6: Lecture.06.edited

Modeling Logic with Structured English Covers all three processes typical of

structured programming:

sequence, conditional statement, and repetition

Page 7: Lecture.06.edited

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.

Page 8: Lecture.06.edited
Page 9: Lecture.06.edited

Structured English is used here to describe input and output.

Page 10: Lecture.06.edited

Structured English is used here to describe arithmetic operations.

Page 11: Lecture.06.edited

Structured English is used here to describe repetition.

Page 12: Lecture.06.edited

Structured English is used here to describe decisions.

Page 13: Lecture.06.edited

Structured English is used here to describe invoking other processes.

Page 14: Lecture.06.edited

4.1

Sort Invoiceby Date

4.2

Scan for due invoices

4.3

GeneratePaymentsfor Due Invoices

InvoicesSorted Invoices

Due Invoices

Payments

Page 15: Lecture.06.edited

Chapte 8

Page 16: Lecture.06.edited

© 2008 by Prentice Hall 16Chapter 8

Page 17: Lecture.06.edited

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 18: Lecture.06.edited

Decision Table Example

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

Page 19: Lecture.06.edited

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

Page 20: Lecture.06.edited

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

Page 21: Lecture.06.edited

Decision Table

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

More dimensions?

Page 22: Lecture.06.edited

Decision Tables

Page 23: Lecture.06.edited
Page 24: Lecture.06.edited

© 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