Requirement Analysis Tools
Traditional structured methods (P+D)
- Entity relationship diagrams (ERD)
- Data Flow Diagrams (DFDs)
- Entity State Transition diagrams
Object Oriented methods (O-O)
- Use Case Diagrams
- Class Diagrams
- Sequence Diagrams
- State Transition Diagrams
Entity Relationship Diagrams
Data Flow Diagrams
Context Diagram
Process specification
Internal Specification
- Pseudo code specification
- Decision Tables
External specification
- Pre-condition-Post condition
Process specification - Pseudo code
Verify customer ID
(DFD process 1.0)
Upon insertion of the customer’s ATM card
check the
ATM-card-no against the lost-stolen-list
If the entered ATM-card-no is on the lost-stolen-list Then
Retain card and
suspend processing
If the entered ATM-card-no is not on the lost-stolen-list
Then
Repeat
Prompt
customer for his PIN
Compare the
entered PIN to the PIN listed in the Bank’s database for this customer
Until
the customer
has entered his correct PIN or
fails to
correctly enter his PIN after 3 attempts
If a valid PIN has been entered Then
Continue
processing
Else
Suspend
processing
Return ATM card
Process specification - Decision Table
Calculate new balances (DFD Process 4.1)
Process specification - An External specification
pre-condition – what must be true for the function to
execute correctly
post-condition -
What is guaranteed to be true after the function executes
Example : A merge function may be specified as
follows
merge(item1:array,item2
: array) : newArray
Pre
SizeOf
(item1)>0, SizeOf(item2)>0,
(both arrays have at least one element)
item1[i]
<item1[i+1], 1<i<noOfitems1 (in order)
item2[i]
<item2[i+1], 1<i<noOfitems2 (in order)
Post
SizeOf(newArray)=SizeOf(item1)
+ SizeOf(item2)
newArray[i]
< newArray[i+1],
1<i<SizeOf(newArray)
These are all testable
Data
Specification
All dataflows in DFDs
should be specified using a combination of elementary dataflows or
previously defined dataflows.
The following symbols can be used in dataflow specifications
and +
or [ ]
repeat { }
optional ( )
comment * *
Data specification
Examples:
Acct-designation
= 1{alphanumeric-character}15
Acct-number
= 8{numeric-character}8
Amount
= rupees+cents
Acct-selection
=
[savings/checking/loan-acct/credit-card]
(acct-designation)
Cust-acct-list
= 1{acct-designation+acct-number}8
Balance-display
= * display of current balance to
customer*
Requirement Specification practice– Good
Use a form based approach
* Describe each function in separate form
Function : obtain balance
Description :
on request, returns the balance for a
customer
account
Inputs : Account number, PIN
Source : Keypad
Outputs : Account balance
Destination : Screen display
Requires : Customer has inserted card and entered PIN
Pre-condition :
Card is from member bank
Post-condition :
Balance is displayed
Side effects : None





0 Comments
Post a Comment