Presentation is loading. Please wait.

Presentation is loading. Please wait.

Technical Methods for Specifying Requirements 1. When to Use Technical Methods  If the description of the requirement is too complex for natural language.

Similar presentations


Presentation on theme: "Technical Methods for Specifying Requirements 1. When to Use Technical Methods  If the description of the requirement is too complex for natural language."— Presentation transcript:

1 Technical Methods for Specifying Requirements 1

2 When to Use Technical Methods  If the description of the requirement is too complex for natural language and if you cannot afford to have the specification misunderstood, you should consider writing or augmenting that portion of the requirements set with a “technical methods” approach. 2

3 Examples of Technical Methods  Pseudocode  Finite state machines  Decision tables and decision trees  Activity diagrams (flowcharts)  Entity-relationship models  And many more 3

4 Pseudocode  Imperative sentences with a single verb and a single object.  A limited set, typically not more that 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. 4

5 Pseudocode 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 5

6 Finite State Machines  Sometimes it is convenient to regard the system as a hypothetical machine that can be in only one of a given number of states at any specific time.  In response to an input (from the user or an external source) the machine changes state and carries out some action and/or generates an output.  Both the output and the next state can be determined solely based on understanding the current state and the event that caused the transition. 6

7 Example of a State Transition Diagram 7 Even Lit Odd Lit Count Even Lit/ LOUT Odd Lit/ LOUT OFF Light burned out 1 sec Off On Off

8 Example of a State Transition Matrix Event StateOn Press Off Press Count Press Bulb Burns Out Every Second Output OffEven lit--- Both Off Even lit---OffOdd litLO/ Even lit ---Even lit Odd lit---OffEven litLO/ Odd lit ---Odd lit Light out/ Even lit ---Off---OffLO/ Odd lit Even lit Light out/ Odd lit ---Off---OffLO/ Even lit Odd lit 8

9 Decision Tables and Decision Trees  When a requirement deals with a combination of inputs and different combinations of those inputs lead to different behaviors or outputs, decision tables or decision trees can be helpful. 9

10 Activity Diagrams  Flowcharts and UML Activity Diagrams are understandable by most people.  They present the same information that can be given in pseudo code, but they show it visually. 10

11 Entity-Relationship Diagrams  They are useful for showing the relationships among data within the system.  ERDs focus on the external behaviors of the system.  They can be difficult for nontechnical readers to understand. 11


Download ppt "Technical Methods for Specifying Requirements 1. When to Use Technical Methods  If the description of the requirement is too complex for natural language."

Similar presentations


Ads by Google