Lec-03
Lec-03
2
Topics covered
3
Requirements Engineering
• Requirements Definition
• A statement in natural language of the services the system provides and its
operational constraints.
• Written for customers.
• Requirements Specification
• A structured document setting out detailed descriptions of the system
services.
• Written as a contract between client and contractor.
• Written for contractors and developers.
Definitions and specifications
User requir ement definition
S y stem end-users
R equirements C l ient engi neers
specifi cation S y stem archi tects
S oftware dev elopers
Reasons for Inconsistency
Requirements Specification of
document requirements
The Requirements Document
• Requirements definition
• Customer-oriented descriptions of the system’s functions and constraints on
its operation.
• Requirements specification
• Precise and detailed descriptions of the system’s functionality and constraints.
• Intended to communicate what is required to system developers and serve as
the basis of a contract for the system development.
Functional Requirements using Structured
Language
1. The user shall be able to search either all of the initial set of
databases or select a subset from it.
2. The system shall provide appropriate viewers for the user to read
documents in the document store.
3. Every order shall be allocated a unique identifier (ORDER_ID) which
the user shall be able to copy to the account’s permanent storage
area.
Form-based Functional Specifications
24
Tabular specification
Condition Action
Sugar level falling (r2 < r1) CompDose = 0
Sugar level stable (r2 = r1) CompDose = 0
Sugar level increasing and rate of CompDose = 0
increase decreasing ((r2-r1)<(r1-r0))
Sugar level increasing and rate of CompDose = round ((r2-r1)/4)
increase stable or increasing. ((r2-r1) If rounded result = 0 then
(r1-r0)) CompDose = MinimumDose
25
Graphical models
• Graphical models are most useful when you need to show how state
changes or where you need to describe a sequence of actions.
• Different graphical models are explained in Chapter 8.
26
Sequence diagrams
• These show the sequence of events that take place during some user
interaction with a system.
• You read them from top to bottom to see the order of the actions
that take place.
• Cash withdrawal from an ATM
• Validate card;
• Handle request;
• Complete transaction.
27
Sequence diagram of ATM withdrawal
ATM Database
Card
Card number
Card OK
PIN request
PIN
Option menu Validate card
<<exception>>
invalid card
Card
Card removed
Complete
Cash transaction
Cash removed
Receipt
28
Requirements Rationale