team skill 5: methods for specifying requirements

19
Team Skill 5: Methods for Specifying Requirements

Upload: paulette-lemaire

Post on 04-Jan-2016

45 views

Category:

Documents


1 download

DESCRIPTION

Team Skill 5: Methods for Specifying Requirements. When Not to use Natural Language. Using Other Specification Methods When ambiguity is not tolerable When erroneous behavior can have extreme legal and financial consequences. Different Technical Methods. Pseudo code Finite State Machines - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Team Skill 5: Methods for Specifying Requirements

Team Skill 5: Methods for Specifying Requirements

Page 2: Team Skill 5: Methods for Specifying Requirements

When Not to use Natural Language

• Using Other Specification Methods– When ambiguity is not tolerable– When erroneous behavior can have extreme legal

and financial consequences

Page 3: Team Skill 5: Methods for Specifying Requirements

Different Technical Methods

• Pseudo code• Finite State Machines• Decision Trees• Activity Diagrams(Flow Charts• Entity Relationship Models• Object Oriented Analysis• Structured Analysis

Page 4: Team Skill 5: Methods for Specifying Requirements

Pseudo code

• Quasi Programming Language• Combines

– Informality of natural language– Strict syntax and control structures of a programming language.

• Consists of– Imperative sentences with a single verb and a single object– A limited set, typically not more than 40-50 of action oriented

verbs from which the sentences must be constructed– Decisions represented with a formal IF-ELSE-ENDIF structure– Iterative activities represented with Do-WHILE or FOR-NEXT

structures.

Page 5: Team Skill 5: Methods for Specifying Requirements

Example

• The algorithm for calculating deferred-service revenue earned for any month is:

• Set SUM(x)=0 • FOR each customer X – IF customer purchased paid support

• AND ((Current month) >= (2 months after ship date)) • AND ((Current month) <= (14 months after ship date))

– THEN Sum(X)=Sum(X) + (amount customer paid)/12

• END

Page 6: Team Skill 5: Methods for Specifying Requirements

Finite State Machines

• In response to an input, such as data entry from the user or an input from an external device, the machine changes its state and then generates an output or carries out an action

• Both the output and the next state can be determined solely on the basis of understanding the current state and the event that caused the transition.

• Hardware designers have used FSMs for decades• Problems of consistency, completeness and ambiguity can

be reduced• State Transition diagram is a popular notation for FSM

Page 7: Team Skill 5: Methods for Specifying Requirements

Example

Page 8: Team Skill 5: Methods for Specifying Requirements

Decision Trees and Decision Tables

• When we have a lot of combinations of inputs– If A is true, then if B and C are also true, generate

output X, unless E is true in which case the required output is Y

• To write all combinations of inputs in a table and describe them explicitly– For above situation if all inputs can have either

true or false then we have 2 ^5 equal to 32 combinations.

Page 9: Team Skill 5: Methods for Specifying Requirements

Example

Page 10: Team Skill 5: Methods for Specifying Requirements

Graphical Decision Tree

Page 11: Team Skill 5: Methods for Specifying Requirements

Activity Diagram

• Similar to Flow Chart• Easily understood by non technical people• Provides visual representation, easy to

understand• Problem: Difficult to keep up to date

Page 12: Team Skill 5: Methods for Specifying Requirements

Example

Page 13: Team Skill 5: Methods for Specifying Requirements

Entity Relationship Models

• When requirements within a set involves a description of the structure and relationships among data within the system.

• Provides high level architectural view of the data

• Correctly focus on external behaviors of the system

• Difficult for non technical reader to understand.

Page 14: Team Skill 5: Methods for Specifying Requirements

Example

Page 15: Team Skill 5: Methods for Specifying Requirements

Object Oriented Modeling

• When requirements that must be refined involve description of structure and relationship among entities within the system

• Object can have– Attributes– Services

• It is becoming famous with popularity of OO and rapid adoption of UML

Page 16: Team Skill 5: Methods for Specifying Requirements

Example

Page 17: Team Skill 5: Methods for Specifying Requirements

Structured Analysis: Data Flow Diagrams

• To show structure and organization of atomic requirements and also the input/output relationship between them.

• Difficult to understand like ERD• Can be further decomposed into lower level

DFDs

Page 18: Team Skill 5: Methods for Specifying Requirements

Example

Page 19: Team Skill 5: Methods for Specifying Requirements