0% found this document useful (0 votes)
9 views29 pages

Se 007

The document discusses requirements for a library management system software. It describes functional requirements for searching books, renewing books, and three main options or functions the system should support: membership management, book lending/return, and notification of due books.

Uploaded by

Anushka Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views29 pages

Se 007

The document discusses requirements for a library management system software. It describes functional requirements for searching books, renewing books, and three main options or functions the system should support: membership management, book lending/return, and notification of due books.

Uploaded by

Anushka Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 29

LECTURE -7

SOFTWARE ENGINEERING
REQUIREMENT ANALYSIS AND SPECIFICATION

1
ANALYSIS OF THE GATHERED REQUIREMENTS

After collecting all data regarding the system to be developed,


 Remove all inconsistencies and anomalies from the requirements,
 Systematically organize requirements into a Software Requirements
Specification (SRS) document.
Main aim of requirements specification:
 Systematically organize the requirements arrived during requirements
analysis.
 Document requirements properly

2
SRS DOCUMENT
SRS document concentrates on:
 What needs to be done
 Carefully avoids the solution (“how to do”) aspects.
The SRS document serves as a contract
 Between development team and the customer.
 Should be carefully written
The requirements at this stage:
 Written using end-user terminology.
If necessary:
 Later a formal requirement specification may be developed from it.
Properties of a Good SRS Document
 It should be concise
 and at the same time should not be ambiguous.
 It should specify what the system must do
 and not say how to do it.
 Easy to change.,
 i.e. it should be well-structured.
 It should be consistent.
 It should be complete. 3
CASE STUDIES

 Student Management System


 Lift System
 Broadcast System
 Book Search System
 Electronic Payment Systems
 Mutual Exclusion
 Cash Dispensing Machine
 Replicated Database Management system
4
PROPERTIES OF A GOOD SRS DOCUMENT

It should be traceable
 You should be able to trace which part of the specification corresponds
to which part of the design, code, etc and vice versa.

It should be verifiable
 e.g. “system should be user friendly” is not verifiable

SRS document, normally contains three important parts:


 Functional requirements,
 Non-functional requirements,
 Critical requirement

 Goals of Implementation .

5
SRS DOCUMENT
It is desirable to consider every system:
 Performing a set of functions {fi}.
 Each function fi considered as:
 Transforming a set of input data to corresponding output data.

Input Data Output Data


fi

6
EXAMPLE: FUNCTIONAL REQUIREMENT

Function F1 : Search Book


 Input:
 an author’s name:
 Output:
 details of the author’s books and the locations of these books in the library.

Author Name Book Details


f1

7
FUNCTIONAL REQUIREMENTS
Functional requirements describe:
 A set of high-level requirements
 Each high-level requirement:
 takes in some data from the user
 outputs some data to the user
 Each high-level requirement:
 might consist of a set of identifiable functions
For each high-level requirement:
 Every function is described in terms of:
 Input data set
 Output data set
 Processing required to obtain the output data set from the input data
set.

8
NONFUNCTIONAL REQUIREMENTS
Characteristics of the system which can not be expressed as functions:
Maintainability, Portability, Usability, etc .
Nonfunctional requirements include:
 Reliability issues,
 Performance issues:
 Example: How fast the system can produce results
 so that it does not overload another system to which
it supplies data, etc.
 Human-computer interface issues,
 Interface with other external systems,
 Security, maintainability, etc.
Non Functional Requirements also include :
 Hardware to be used,
 Operating system
 or DBMS to be used
 Capabilities of I/O devices
 Standards compliance
 Data representations 9
 by the interfaced system
ORGANIZATION OF THE SRS DOCUMENT
Introduction.
Functional Requirements
Nonfunctional Requirements
 External interface requirements
 Performance requirements
Goals of implementation

Typical Requirement of SRS Document for ATM System


A high-level function is one:
 Using which the user can get some useful piece of work done.
Can the receipt printing work during withdrawal of money from an ATM:
 Be called a useful piece of work?
A high-level requirement typically involves:
 Accepting some data from the user,
 Transforming it to the required response, and then
 Outputting the system response to the user. 10
HIGH-LEVEL FUNCTION
A high-level function:
 Usually involves a series of interactions between the system and one or more users.
Even for the same high-level function,
 There can be different interaction sequences (or scenarios)
 Due to users selecting different options or entering different data items.

Example Functional Requirements : Search a Book

Req. 1:
 Once the user selects the “search” option,
 he is asked to enter the key words.
 The system should output details of all books
 whose title or author name matches any of the key words entered.
 Details include: Title, Author Name, Publisher name, Year of Publication, ISBN
Number, Catalog Number, Location in the Library.

11
Example Functional Requirements : Search a Book
Req. 2:
 When the “renew” option is selected,
 The user is asked to enter his membership number and password.
 After password validation,
 The list of the books borrowed by him are displayed.
 The user can renew any of the books:
 By clicking in the corresponding renew box.
REQ 1:
R.1.1:
 Input: “search” option,
 Output: user prompted to enter the key words.
R1.2:
 Input: key words
 Output: Details of all books whose title or author name matches any of the key
words.
 Details include: Title, Author Name, Publisher name, Year of Publication,
ISBN Number, Catalog Number, Location in the Library.
 Processing: Search the book list for the keywords
12
REQ. 2:
R2.1:
 Input: “renew” option selected,
 Output: user prompted to enter his membership number and password.
R2.2:
 Input: membership number and password
 Output:
 list of the books borrowed by user are displayed. User prompted to enter
books to be renewed or
 user informed about bad password
 Processing: Password validation, search books issued to the user from borrower
list and display.
R2.3:
 Input: user choice for renewal of the books issued to him through mouse clicks
in the corresponding renew box.
 Output: Confirmation of the books renewed
 Processing: Renew the books selected by the in the borrower list.

13
EXAMPLES OF BAD SRS DOCUMENTS
Unstructured Specifications:
 Narrative essay --- one of the worst types of specification document:
 Difficult to change,
 Difficult to be precise,
 Difficult to be unambiguous,
 Scope for contradictions, etc.
Noise:
 Presence of text containing information irrelevant to the problem.
Silence:
 aspects important to proper solution of the problem are omitted.
Overspecification:
 Addressing “how to” aspects
 For example, “Library member names should be stored in a sorted
descending order”
 Overspecification restricts the solution space for the designer.
Contradictions:
 Contradictions might arise 14
 if the same thing described at several places in different ways.
EXAMPLES OF BAD SRS DOCUMENTS

Ambiguity:
 Literary expressions
 Unquantifiable aspects, e.g. “good user interface”
Forward References:
 References to aspects of problem
 defined only later on in the text.
Wishful Thinking:
 Descriptions of aspects
 for which realistic solutions will be hard to find.

15
REPRESENTATION OF COMPLEX PROCESSING LOGIC :
o Decision trees
o Decision tables
Decision trees:
 Edges of a decision tree represent conditions
 Leaf nodes represent actions to be performed.
A decision tree gives a graphic view of:
 Logic involved in decision making
 Corresponding actions taken.
Decision tables specify:
 Which variables are to be tested
 What actions are to be taken if the conditions are true,
 The order in which decision making is performed.

16
LIBRARY MANAGEMENT SYSTEM : LMS
A Library Membership automation Software (LMS) should support the following
three options:
 New member,
 Renewal,
 Cancel membership.

When the new member option is selected,


 The software asks details about the member:
 name,
 address,
 phone number, etc.

17
LIBRARY MANAGEMENT SYSTEM : LMS
If proper information is entered,
 A membership record for the member is created
 A bill is printed for the annual membership charge plus the
security deposit payable
If the renewal option is chosen,
 LMS asks the member's name and his membership number
 checks whether he is a valid member.
 If the name represents a valid member,
 the membership expiry date is updated and the annual
membership bill is printed,
 otherwise an error message is displayed

18
LIBRARY MANAGEMENT SYSTEM : LMS

If the cancel membership option is selected and the name of a valid member is
entered,
 The membership is cancelled,
 A cheque for the balance amount due to the member is printed
 The membership record is deleted.

19
DECISION TREE

- Get details
- Create record
- Print bills
New
member
- Get Details
User Renewal - Update record
- Print bills
input
Cancel - Get Details
- Print Cheque
- Delete record
Invalid
option
- Print error message

20
DECISION TABLE

A decision table shows in a tabular form:


 Processing logic and corresponding actions
Upper rows of the table specify:
 The variables or conditions to be evaluated
Lower rows specify:
 The actions to be taken when the corresponding conditions are satisfied.
In technical terminology,
 a column of the table is called a rule:
 A rule implies:
 if a condition is true, then execute the corresponding action.

21
EXAMPLE:

Conditions
Valid selection NO YES YES YES
New member -- YES NO NO
Renewal -- NO YES NO
Cancellation -- NO NO YES
Actions
Display error message -- -- --

Ask member's name etc.


Build customer record -- -- --
Generate bill -- --
Ask membership details --
Update expiry date -- -- --
Print cheque -- -- --
Delete record -- -- --
22
FORMAL SPECIFICATION
A formal specification technique is a mathematical method to:
 Accurately specify a system.
 Verify that implementation satisfies specification.
 Prove properties of the specification.
Advantages:
 Well-defined semantics, no scope for ambiguity
 Automated tools can check properties of specifications
 Executable specification
Disadvantages of formal specification techniques:
 Difficult to learn and use
 Not able to handle complex systems

23
FORMAL SPECIFICATION
Mathematical techniques used include:
 Logic-based
 set theoretic
 algebraic specification
 finite state machines, etc.

Semi Formal Specification


Structured specification languages
 SADT (Structured Analysis and Design Technique)
 PSL/PSA (Problem Statement Language/Problem Statement Analyzer)
 PSL is a semi-formal specification language
 PSA can analyze the specifications expressed in PSL

24
EXECUTABLE SPECIFICATION LANGUAGE

If specification is expressed in formal language:


 it becomes possible to execute the specification to provide a system
prototype.

However, executable specifications are usually slow and inefficient .


Executable specifications only test functional requirements:
 If non-functional requirements are important for some product,
 The utility of an executable specification prototype is limited

25
4GLS
4GLs (Fourth Generation Languages) are examples of
 executable specification languages.
4GLs are successful
 because there is a lot of commonality across data processing
applications.
4GLs rely on software reuse
 Where common abstractions have been identified and parameterized.
Rewriting 4GL programs in higher level languages:
 Result in upto 50% lower memory requirements
 Also the programs run upto 10 times faster.

26
SUMMARY
Requirements analysis and specification
 An important phase of software development:
 Any error in this phase would affect all subsequent phases of development.
Consists of two different activities:
 Requirements gathering and analysis
 Requirements specification
The aims of requirements analysis:
 Gather all user requirements
 Clearly understand exact user requirements
 Remove inconsistencies and incompleteness.
The goal of specification:
 Systematically organize requirements
 Document the requirements in an SRS document

27
SUMMARY
Main components of SRS document:
 Functional requirements
 Non-functional requirements
 Constraints
Techniques to express complex logic:
 Decision tree
 Decision table
Formal requirements specifications have several advantages.
 But the major shortcoming is that these are hard to use.

28
29

You might also like