l ecture 12 – p rocess s pecification definition, motivation and elements structured english...

16
LECTURE 12 – PROCESS SPECIFICATION Definition, Motivation and Elements Structured English Decision Tables Decision trees Software Project Management Maria Petridou 1

Upload: augustine-wheeler

Post on 17-Dec-2015

217 views

Category:

Documents


1 download

TRANSCRIPT

LECTURE 12 – PROCESS SPECIFICATION

• Definition, Motivation and Elements• Structured English• Decision Tables• Decision trees

Software Project Management Maria Petridou

1

DEFINITION, MOTIVATION AND ELEMENTS

Software Project Management

2

Maria Petridou

Process specification methods are tools to describe, analyse and document the decision-making logic in processes.

Process specification can be to describe low-level or high-level processes.

Process specification is required for describing in detail the way in which processes transform the input into output.

Process specification helps to achieve: Completeness Accuracy Efficient communication

DEFINITION, MOTIVATION AND ELEMENTS

Software Project Management

3

Maria Petridou

Goals of process specification: Describe process accurately -Specify what will happen in the

process given all possible conditions Validate the system design - There should be consistency

between DFDs, ERDs and process specifications Help when processes require specification

DEFINITION, MOTIVATION AND ELEMENTS

Software Project Management

4

Maria Petridou

Information that should be included in a complete process specification: Process name and ID Brief verbal description List of input and output data flows Type of process - batch, online or manual Description of the process decision-making logic Other information such as use of pre-written code, clarifications,

incomplete decisions, etc.

DEFINITION, MOTIVATION AND ELEMENTS

Software Project Management

5

Maria Petridou

Methods to specify the process decision-making logic: Structured English - Based on written instructions and statements.

Similar to pseudo-code. Decision Tables – Based on conditions, rules and actions. Similar

to truth tables. Decision Trees – Based on graphical illustration of the sequential

decision process. Similar to flow diagrams.

STRUCTURED ENGLISH

Software Project Management

6

Maria Petridou

Used for simple decisions making logic Use capitalised keywords: IF,THEN,WHILE, etc. Careful use or some logical and relational words such as:

and, or, greater than, etc. Based on four types of logic: sequences, decisions, cases and

iterations.

STRUCTURED ENGLISH

Software Project Management

7

Maria Petridou

SequencesAverageCost = Total / Items

Fine = AverageCost x 0.15

Print “Fine to pay:” Fine

CasesCASE

IF day is 5

THEN print “Saturday”

IF day is 6

THEN print “Sunday”

ELSE print “Weekday”

STRUCTURED ENGLISH

Software Project Management

8

Maria Petridou

Decisions

IF price less than credit

THEN print “You have credit”

ELSE print “You have no credit”

IterationsDO

Print “Enter password”

Get Pswd

WHILE Pswd ≠ ActivePswd

i=1

DO WHILE i < 10

j = i x i

i = i +1

print (i,j)

END DO

DECISION TABLES

Software Project Management

9

Maria Petridou

Used for more complex decision-making logic. Use conditions, rules and actions arranged in a table to express decision

making logic. Determine adequate number of conditions. Eliminate redundancy by combining rules (condition alternatives +

actions). Re-arrange the table if required to achieve clarity. Four main problems that can occur in developing decision tables:

incompleteness, impossible situations, contradictions, redundancy.

DECISION TABLES

Software Project Management

10

Maria Petridou

Example. When you go to the bar, may want 4 cokes, 4 pints and you may want 4 whiskies. You may of course want nothing! After 4 pints you will be drunk, after 4 whiskies you will be very drunk and if you combine whiskies and pints then you will be mullered!Produce an optimised decision table to show how drunk you might get depending on the decisions you make.

DECISION TABLES

Software Project Management

11

Maria Petridou

Identify the conditions, rules and actions.Number of rules: 2 ^ No of Conditions.

DECISION TABLES

Software Project Management

12

Maria Petridou

Construct the table

DECISION TABLES

Software Project Management

13

Maria Petridou

Then combine the rules – Optimised Table

DECISION TREES

Software Project Management

14

Maria Petridou

Used for complex decision-making logic and in particular, to maintain the sequence of decisions.

Use conditions (circles) and actions (squares) in a branching tree to express decision-making logic.

Determine conditions, actions and their sequence. List all required possibilities when drawing the tree. Construct the tree from left to right. The order of checking conditions and executing actions is immediately

noticeable in decision trees.

DECISION TREES

Software Project Management

15

Maria Petridou

Compared to decision tables, decision trees are more readily understood by others in the organization.

1

2

6

Condition 1

Condition 2Action 4

Action 13

4

5

Condition 3

Condition 4Action 3

Action 2

DECISION TREES

Software Project Management

16

Maria Petridou

Example. Decision tree for the decision-making logic in library system.

Reading: (Kendall&Kendall, chapter 9).