unit2-1 software engineering
unit2-1 software engineering
SOFTWARE
REQUIREMENTS
ANALYSIS AND
SPECIFICATIONS
1
Requirement Engineering
Requirements describe
What not How
Produces one large document written in natural
language contains a description of what the system will
do without describing how it will do it.
Crucial process steps
Quality of product Process that creates it
-- What to validate
Requirement Engineering
-- State of practice
EXAMPLE:
5
Requirement Engineering
EXAMPLE:
SOLUTION:
1. Issue of books
2. Return of books
3. Query processing
6
Types of Requirements
Types of Requirements
Requirements
Functional Non-Functional
7
Types of Requirements
Maintainability
Portability For Developers
Testability
Types of Requirements
9
Types of Requirements
Interface Specification
• Important for the customers.
TYPES OF INTERFACES
10
Feasibility Study
1. Operation Feasibility
2. Technical Feasibility
3. Economic Feasibility
12
Elements of a good Feasibility Study
• Requirements
• Approach
• Evaluation
13
• Review
Requirements Elicitation
Perhaps
• Most difficult
• Most critical
• Most error prone
• Most communication intensive
Succeed
1.Interviews
2.Brainstorming Sessions
3.FAST
15
1. Interviews
Both parties have a common goal
Success of the
project
• Both parties would like to understand each other.
• Interview can be of two types open ended or structured
• In open ended, there is no present agenda, context free questions can
be asked to understand the problem, to have an over view over the
situation.
• In structured interview, agenda pre-set.
Selection of stakeholder: Groups to be considered for interviews:-
1. Entry level personnel
2. Middle level stakeholder
3. Managers 16
group discussions
Groups
1. Users 2. Middle Level managers 3. Total
Stakeholders
18
2. Brainstorming Sessions
A Facilitator may handle group bias, conflicts carefully.
19
Delphi Technique
.
• Here participants are made to write the requirement on a
piece of paper, then these requirements are exchanged
among participants who gave their comments to get a
revised set of requirements. This process is repeated till
the final consensus is reached.
20
3. Facilitated Application
specification Techniques (FAST)
Objective is to bridge the expectation gap.
21
3. Facilitated Application
specification Techniques (FAST)
Guidelines
22
3. Facilitated Application
specification Techniques (FAST)
FAST session Preparations
23
3. Facilitated Application specification
Techniques (FAST)
24
4. Quality Function Deployment
Technical requirements.
Documented
-- Normal requirements
-- Expected requirements
-- Exciting requirements
25
Requirements Elicitation
Steps
1. Identify stakeholders
2. List out requirements
3. Degree of importance to each
requirement.
26
Requirements Elicitation
5 Points : V. Important
4 Points : Important
3 Points : Not Important but nice to have
2 Points : Not important
1 Points : Unrealistic, required
further exploration
Requirement Engineer may categorize like:
(i) It is possible to achieve
(ii) It should be deferred & Why
(iii It is impossible and should be dropped
) from consideration
First Category requirements will be implemented as
per priority assigned with every requirement.
27
5. The Use Case Approach
Use Cases
A use case is initiated by a user with a particular goal
in mind, and completes successfully when that
goal is satisfied.
30
* It describes the sequence of interactions
between actors and the system necessary to
deliver the services that satisfies the goal.
* Alternate sequence
* System is treated as black box.
Thus
Use Case captures who (actor) does what
(interaction) with the system, for what purpose (goal),
without dealing with system internals.
31
*defines all behavior required of the system,
bounding the scope of the system.
Jacobson & others proposed a template for writing
Use cases as shown below:
1. Introduction
Describe a quick background of the use case.
2.Actors
List the actors that interact and participate in the
use cases.
3.Pre Conditions
Pre conditions that need to be satisfied for the use
case to perform.
4. Post Conditions
Define the different states in which we expect the system
to be in, after the use case executes.
32
5. Flow of events
1. Basic Flow
List the primary events that will occur when this use case is executed.
2. Alternative Flows
Any Subsidiary events that can occur in the use case should be
separately listed. List each such event as an alternative flow.
A use case can have many alternative flows as required.
6.Special Requirements
Business rules should be listed for basic & information flows as special
requirements in the use case narration .These rules will also be used for
writing test cases. Both success and failures scenarios should be
described.
7.Use Case relationships
*Use Cases are for “what” the system is , not “how” the
system will be designed
36
Use case diagram for Result Management System
Maintain
Student
Details
Maintain
Subject
Details
Data Entry
Operator Maintain
Result
Details
Login
Administrator/
DR Generate
Result
Reports
View
Results
Student/
Teacher
37
1. Maintain student Details
Add/Modify/update students details like name, address.
2.Maintain subject Details
Add/Modify/Update Subject information semester wise
3.Maintain Result Details
Include entry of marks and assignment of credit points for
each paper.
4. Login
Use to Provide way to enter through user id & password.
5. Generate Result Report
Use to print various reports
6. View Result
(i) According to course
code
(ii) According to 38
Enrollment number/roll
number
REQUIREMENT ANALYSIS
39
Draw the Context Diagram
49
Context Diagram of Result Mgmt System
50
Model the Requirements
This process usually consists of various graphical representations of the
functions, data entities, external entities and the relationships between
them.
This graphical view may help to find incorrect, inconsistent, and missing
requirements.
• Data Dictionaries
• ER Diagrams
51
Data Flow Diagrams
DFD show the flow of data through the system.
52
Standard Symbols for DFD’s
Symbol Name Function
54
DFD for UNIVERSITY COURSE REGISTRATION SYSTEM
55
Data Dictionaries
Data Dictionaries are simply repositories to store information
about all data items defines in DFD.
sequence:
+ A plus sign indicates one element is followed by or concatenated with
another element.
repetition:
[] Square brackets are used to enclose one or more optional elements.
| A vertical line stands for "or" and is used to indicate alternatives.
selection:
{} Curly braces indicate that the element being defined is made up of a
series of repetitions of the element(s) enclosed in the brackets.
repetition:
Completed-order = [ item-ordered ]
* A complete customer order *
selection:
performances-attended = counter
* Performances-attended is the number of performances this customer has
attended.*
61
Entity – Relationship
Model
(ER model)
62
Introduction
63
Basic elements in ER model
64
Symbols used in E-R Diagram
Entity – rectangle
Attribute -oval
Relationship – diamond
Link - line
65
ER Model
Entity
Entities are represented by means of rectangles. Rectangles are named with the
entity set they represent.
66
ER Model
Relationship
67
TYPES OF ATTRIBUTES
1. Simple attribute
2. Composite attribute
3. Derived attribute
4. Stored attribute
5. Single valued attribute
6. Multi valued attribute
68
TYPES OF ATTRIBUTES
69
TYPES OF ATTRIBUTES
•Composite attribute:
70
TYPES OF ATTRIBUTES
•Derived attribute:
71
TYPES OF ATTRIBUTES
Stored attribute:
72
TYPES OF ATTRIBUTES
Single-valued attribute:
For example a person can have only one ‘date of birth’, ‘age’ ,
Social_Security_Number.etc.
That is a single valued attributes can have only single value. But
it can be simple or composite attribute.
73
TYPES OF ATTRIBUTES
Multi-value attribute:
Attribute may contain more than one values. Denoted by double circled oval
line connecting to the entity in the ER diagram.
Ex: Phone-number, College-degree, email addresses etc
74
KEYS
1. Candidate Key
2. Composite Key
3. Primary key
4. Foreign Key
75
CANDIDATE KEY
76
COMPOSITE KEY
77
PRIMARY KEY
78
FOREIGN KEY
•Both foreign and primary keys must be of the same data type
79
Graphical Representation in E-R diagram
80
DEGREE OF A RELATIONSHIP
CUSTOMER
81
CARDINALITY CONSTRAINTS
82
CARDINALITY CONSTRAINTS
one-to-one
83
CARDINALITY CONSTRAINTS
one to many
WORKS-
EMPLOYEE DEPARTMENT
FOR
1 M
84
CARDINALITY CONSTRAINTS
many-to-one
WORKS-
EMPLOYEE DEPARTMENT
FOR
85
CARDINALITY CONSTRAINTS
many-to-many
WORKS-
EMPLOYEE PROJECT
ON
M N
86
PARITICIPATION CONSTRAINTS
(OPTIONALITY)
TOTAL
PARTICIPATION
PARTIAL
• Ex: if company policy says that every employee must work for the
department then participation of employee in work-for is total.
WORKS-
EMPLOYEE DEPARTMENT
FOR
N 1
For example, attributes of a person like name, age, and gender can
be inherited by lower level entities like student and teacher etc.
Benefits of ER diagrams
Second, ER diagrams are readily translatable into relational tables which can
be used to quickly build databases. In addition, ER diagrams can directly be
used by database developers as the blueprint for implementing data in
specific software applications.
1.Identify entities
• list all potential entity types. These are the object
of interest in the system. It is better to put too
many entities in at this stage and them discard
them later if necessary.
2.Remove duplicate entities
• Ensure that they really separate entity types or just
two names for the same thing
• Also do not include the system as an entity type
• e.g. if modelling a library, the entity types might be
books, borrowers, etc.
• The library is the system, thus should not be an entity
type.
3.List the attributes of each entity
• Ensure that the entity types are really needed.
• Are any of them just attributes of another entity
type?
• If so keep them as attributes a nd cross them off
the entity list.
• Do not have attributes of one entity as attributes
of another entity!
4.Mark the primary keys
• Which attributes uniquely identify instances of
that entity type?
• Bus - Company owns busses and will hold information about them.
• Route - Buses travel on routes and will need described.
• Town - Buses pass through towns and need to know about them
• Driver - Company employs drivers, personnel will hold their data.
• Stage - Routes are made up of stages
• Garage - Garage houses buses, and need to know where they are.
RELATIONSHIPS
1. New member
2. Renewal
3. Cancel membership
Decision: When the 'new member' option is selected, the software asks
details about the member like member's name, address, phone number etc.
Action: If proper information is entered, then a membership record for the
member is created and a bill is printed for the annual membership charge
plus the security deposit payable.
Example Contd..
Renewal option
Decision: If the 'renewal' option is chosen, the LMS asks for the member's
name and his membership number to check whether he is a valid member or
not.
Action: If the membership is valid then membership expiry date is updated
and the annual membership bill is printed, otherwise an error message is
displayed.
STRUCTURE
written by customer
written by developer
The basic issues that the SRS writer(s) shall address are the
following:
a) Functionality
b) External Interfaces
c) Performance
d) Attributes
e) Design Constraints imposed on an implementation.
SRS Should
-- Correctly define all requirements
-- not describe any design details
-- not impose any additional constraints
Characteristics of a good SRS
SRS should be
1. Correct
2. Unambiguous
3. Complete
4. Consistent
5. Ranked for importance and/or stability
6. Verifiable
7. Modifiable
8. Traceable
Advantages of a SRS
• It will be very difficult for user document writers to write the users’
manuals properly without understanding the SRS document.
Organization of the SRS
IEEE has published guidelines and standards to organize an SRS.
1. Introduction
1.1 Purpose
1.2 Scope
1.3 Definition, Acronyms and abbreviations
1.4 References
Overview
1.5
2. The Overall Description
2. Product Perspective
1 2.1.1 System Interfaces
2.1.2 Interfaces
2.1.3 Hardware Interfaces
2.1.4 Software Interfaces
2.1.5 Communication Interfaces
2.1.6 Memory Constraints
2.1.7 Operations
2.1.8 Site Adaptation Requirements
Organization of the SRS
3. Specific Requirements
3.1External Interfaces
3.2Functions
3.3Performance requirements
3.4Logical database requirements
3.5Design Constraints
3.6Software System attributes
3.7Organization of specific requirements
3.8Additional Comments.
1. Requirements Reviews
2. Prototyping
REQUIREMENTS REVIEWS
REQUIREMENTS VALIDATION
Problem actions
• Requirements clarification
• Unrealistic requirements
• Security issues
REVIEW CHECKLISTS
Understandability
Redundancy
Completeness
Ambiguity
Consistency
Organization
Conformance to standards
Traceability
Requirement Management
• Very critical.
•Assignment of responsibilities
• Management of changes
• Documentation
•Requirements traceability
• Communication of change
• Establishment of baseline
SOFTWARE QUALITY
ASSURANCE
Software Quality
•Conformance to requirements
•Fitness for the purpose
•Level of satisfaction
When user uses the product, and finds the product fit for its
purpose, he/she feels that product is of good quality. 1
3
6
Software Quality Assurance
1
3
7
Software Quality Assurance
Are we building the product right? Are we building the right product?
Ensure that the software system Ensure that the functionalities meet
meets all the functionality the intended behavior.
Verifications take place first and Validation occurs after verification and
include the checking for mainly involves the checking of the
documentation, code etc overall product.
Done by developers Done by testers
1. Software Inspection
2. System testing
The testing can be carried out using following tests:-
i. Unit testing
ii. Module testing
iii. System testing
iv. Acceptance testing
1
4
1
SQA Plans
The SQA Plan provides a road map for instituting software quality
assurance. Developed by the SQA group, the plan serves as a
template for SQA activities that are instituted for each software
project.
1. ISO 9000
2. Capability Maturity Model
1
4
3
ISO 9000
• “ISO” in greek means “equal”, so the association wanted to
convey the idea of equality.
• It is an attempt to improve software quality based on ISO
9000 series standards.
• It has been adopted by over 130 countries including India
and Japan.
• One of the problem with ISO-9000 series standard is that it
is not industry specific.
• It can be interpreted by the developers to diverse projects
such as hair dryers, automobiles, televisions as well as
software.
Notes
• ISO-9000 applies to all types of organizations.
• After adopting the standards, a country
typically permits only ISO registered companies
to supply goods and services to government
agencies and public utilities.
• ISO-9000 series is not just software standard,
but are applicable to a wide variety of industrial
activities including design/development,
production, installation and servicing.
ISO 9000 Certification
This process consists of following stages:-
1. Application
2. Pre-assessment
3. Document review and adequacy of audit
4. Compliance audit
5. Registration
6. Continued surveillance
ISO 9000 Series
The types of software industries to which the different ISO
standards apply are as follows:
ISO 9000 standard is written for a wide range of industries whereas CMM
framework is specifies for the software industry.
CMM is a five level framework for measuring software engineering practices, and
ISO 9000 defines a minimum level of attributes for a quality management program.
The ISO 9000’s concept is to follow a set of standards to make success repeatable.
The CMM emphasizes a process of continuous improvement.