SE(unit-2)final[1]
SE(unit-2)final[1]
Metrics for project size estimation, Project estimation techniques, Empirical Estimation techniques,
Requirements gathering and analysis, Software Requirements Specification (SRS), Formal system specification,
Axiomatic specification, Algebraic specification, Executable specification and 4GL.
UNIT – 2
Software Project Management:
It involves planning, organizing, and overseeing the development of software applications or systems. It focuses on
managing resources, timelines, and scope to ensure the successful completion of a project. Key aspects of Software
Project Management include:
Project Planning: This involves defining the project's objectives, scope, deliverables, timeline, and
resources. Techniques such as Work Breakdown Structure (WBS), Gantt charts, and milestone tracking are
often used.
Team Management: Software projects typically require a variety of roles, including developers, testers,
designers, and business analysts. Effective communication and collaboration are essential for ensuring team
members work efficiently.
Risk Management: Identifying potential risks early on and developing strategies to mitigate them is crucial.
This includes technical risks, budget constraints, or potential delays.
Budget Management: Estimating the costs involved and controlling the budget throughout the project is
vital. This can include costs related to resources, tools, and external services.
Quality Assurance: Implementing processes like continuous integration, automated testing, and code
reviews to ensure the software meets the desired quality standards.
Agile Methodology: Many software projects follow Agile practices, such as Scrum or Kanban, to allow for
flexibility, faster iterations, and adaptability to change.
Stakeholder Communication: Regular updates and discussions with stakeholders (e.g., clients, product
owners, business executives) are necessary to ensure the project aligns with business goals and customer
expectations.
Project Monitoring and Control: Ongoing tracking of project progress, managing any deviations from the
plan, and making adjustments as needed.
software project management complexities:
Software project management can be complex due to a variety of factors. Here are some key complexities often
encountered:
1. Understanding What’s Needed:
o Sometimes, the requirements (what the software needs to do) change during the project. This can
confuse the team and slow things down.
o It’s also hard to understand exactly what people want, especially if the requirements aren’t clear
from the start.
2. Time and Money:
o Projects need to be finished on time, but unexpected problems can delay things.
o Sticking to the budget is tough, especially if the project takes longer than planned or requires more
resources.
3. Managing People and Resources:
o You need the right people for the job. If a team member isn’t skilled enough or is overloaded with
work, it can cause delays.
o Also, having the right tools and technology is important to avoid setbacks.
4. Dealing with Risks:
o There are always unknowns in a project, like technical problems or unexpected market changes. It’s
tough to predict everything, and managing these risks is important.
5. Communication Issues:
o Keeping everyone on the same page, from team members to clients, is hard. Miscommunication can
cause mistakes or delays.
o Managing remote or global teams with different time zones can make communication even trickier.
6. Ensuring Quality:
o It’s important to test the software thoroughly. If testing is skipped or rushed, problems can appear
later, delaying the project.
o Keeping the code clean and easy to maintain is essential, but it requires extra effort.
7. Project Scope:
o The project can grow beyond its original goals (this is called “scope creep”), leading to more work,
more time, and more money needed.
o Adding too many new features can delay the project or make it harder to finish on time.
8. Managing Dependencies:
o The project might rely on other tools or teams to complete certain tasks, and if those don’t work as
expected, it can hold up progress.
9. Team and Organizational Challenges:
o Working with a diverse team with different skills, backgrounds, and opinions can be tough, especially
if the organization has complicated structures.
o Poor communication within the organization can cause delays in decision-making.
10. Technology Problems:
New technologies might help, but adopting them can cause delays if they’re not properly tested or if they
don’t fit well with the existing system.
If the project needs to work with older software, there might be compatibility issues.
11. Change Management:
As the project progresses, changes might be necessary. However, adjusting to new plans, tools, or ideas can
be difficult for the team.
Stakeholders (like clients or higher-ups) might resist changes, making it harder to adapt.
12. Tracking Progress:
It’s important to regularly check how the project is doing. If things are falling behind, early action can
prevent bigger problems.
Using the right data and metrics helps make better decisions, but gathering and interpreting that data can be
difficult
Responsibilities of a software project manager:
A software project manager (SPM) is responsible for overseeing the successful delivery of software projects. Their
duties typically include:
1. Project Planning:
o Defining the project scope, goals, and deliverables.
o Creating detailed project schedules and resource plans.
o Estimating timelines and setting realistic deadlines.
2. Team Management:
o Assembling a project team with the right skills and expertise.
o Assigning tasks and responsibilities to team members.
o Ensuring effective communication and collaboration among team members.
3. Stakeholder Communication:
o Acting as the primary point of contact for project stakeholders.
o Regularly updating stakeholders on project progress, risks, and issues.
o Managing client expectations and ensuring their requirements are met.
4. Risk Management:
o Identifying potential risks and developing mitigation strategies.
o Monitoring risks throughout the project lifecycle and adjusting plans as necessary.
5. Quality Assurance:
o Ensuring that the software meets quality standards through testing and reviews.
o Implementing processes for continuous improvement in development practices.
6. Budget and Resource Management:
o Managing the project budget and ensuring the project stays within financial constraints.
o Allocating resources efficiently and addressing any resource shortages.
7. Project Execution:
o Overseeing day-to-day project activities, ensuring milestones are met.
o Coordinating with cross-functional teams, including development, QA, and operations.
8. Problem-Solving:
o Addressing challenges or conflicts within the project team.
o Finding solutions to unexpected issues that arise during the project lifecycle.
9. Project Closure:
o Ensuring that the project is delivered on time and meets the defined goals.
o Conducting a post-project review and capturing lessons learned.
o Documenting the final product and ensuring proper handover or deployment.
10. Continuous Monitoring:
o Tracking progress against goals and adjusting the course of action when needed.
o Using project management tools and techniques to keep the project on track.
Definition: A metric based on the number of use cases in the system, which can reflect the system’s functional
requirements.
Estimation Process: Count the use cases and actors, categorize their complexity, and assign weight to each.
5. Feature-Based Estimation
Definition: A metric based on the number of features, components, or modules within a project.
Use Case: Common in product development and software applications where the complexity can be broken down into
specific features.
Estimation Process: Break the system down into high-level features, estimate the effort for each feature, and sum
them up.
6. Person-Months/Person-Days
Definition: Estimates the number of months or days of work required by one person to complete the project.
Use Case: Typically used for early-stage project planning, especially in traditional waterfall projects.
Definition: Measures the complexity of a program’s control flow, often related to the number of decision points in the
code.
Use Case: Used to estimate the testing effort or the maintainability of a project.
Estimation Process: Typically computed using tools that analyze the codebase.
Definition: A hierarchical decomposition of the project into smaller, more manageable components.
Use Case: Used to break down the project into tasks that can be estimated based on time, effort, or resources
required.
Estimation Process: Each task is assigned an effort estimate, and the total project size is the sum of all tasks.
Definition: Measures the amount of work completed in a specific iteration (often measured in story points).
Use Case: Used to predict how long future iterations will take based on the team’s historical performance.
Estimation Process: Track the velocity over multiple sprints and use it to estimate how many sprints are needed to
complete the project.
Definition: Involves estimating the total project cost based on resources, time, and complexity.
Use Case: Used when there is a need to forecast the financial investment required for the project.
Estimation Process: Can involve methods like analogy-based estimation, expert judgment, or parametric estimation.
Metrics for project size estimation:
When estimating the size of a project, there are several metrics that can help gauge the scope, effort, and resources
needed. Here are some common metrics used for project size estimation:
1. Function Points (FP)
Definition: Measures the functionality provided to the user, independent of the technology used.
Use Case: Commonly used in software development to estimate the effort and complexity based on the
number of features (e.g., inputs, outputs, inquiries, files, and interfaces).
Estimation Process: Function points are classified into simple, average, and complex categories. The total
function points are multiplied by a productivity factor (e.g., hours per FP).
2. Lines of Code (LOC)
Definition: The total number of lines in the source code.
Use Case: Widely used in software development, especially for coding projects.
Advantages: Provides a quick way to estimate project size and productivity.
Disadvantages: Can be misleading as different programming languages and coding styles can lead to widely
varying LOC counts for the same functionality.
3. Story Points (Agile Methodology)
Definition: A unit of measure used in Agile projects to estimate the relative effort required to implement a
user story.
Use Case: Used in Scrum or Kanban methodology. Story points reflect the complexity, uncertainty, and effort
of the task.
Estimation Process: Typically estimated through techniques like Planning Poker, where team members agree
on the complexity and assign points.
4. Use Case Points (UCP)
Definition: A metric based on the number of use cases in the system, which can reflect the system’s
functional requirements.
Use Case: Primarily used in object-oriented design.
Estimation Process: Count the use cases and actors, categorize their complexity, and assign weight to each.
5. Feature-Based Estimation
Definition: A metric based on the number of features, components, or modules within a project.
Use Case: Common in product development and software applications where the complexity can be broken
down into specific features.
Estimation Process: Break the system down into high-level features, estimate the effort for each feature,
and sum them up.
6. Person-Months/Person-Days
Definition: Estimates the number of months or days of work required by one person to complete the
project.
Use Case: Typically used for early-stage project planning, especially in traditional waterfall projects.
Estimation Process: Based on expert judgment or historical data.
7. Complexity Metrics (Cyclomatic Complexity)
Definition: Measures the complexity of a program’s control flow, often related to the number of decision
points in the code.
Use Case: Used to estimate the testing effort or the maintainability of a project.
Estimation Process: Typically computed using tools that analyze the codebase.
8. Work Breakdown Structure (WBS)
Definition: A hierarchical decomposition of the project into smaller, more manageable components.
Use Case: Used to break down the project into tasks that can be estimated based on time, effort, or
resources required.
Estimation Process: Each task is assigned an effort estimate, and the total project size is the sum of all tasks.
Definition: Measures the amount of work completed in a specific iteration (often measured in story points).
Use Case: Used to predict how long future iterations will take based on the team’s historical performance.
Estimation Process: Track the velocity over multiple sprints and use it to estimate how many sprints are needed to
complete the project.
Definition: Involves estimating the total project cost based on resources, time, and complexity.
Use Case: Used when there is a need to forecast the financial investment required for the project.
Estimation Process: Can involve methods like analogy-based estimation, expert judgment, or parametric estimation.
NOTE:
Available data.
Domain expertise.
Complexity of requirements.
o Can be time-consuming
3. Analogous Estimation
How it works: Uses historical data from similar projects to estimate parameters for the current project.
Advantages:
Disadvantages:
4. Parametric Estimation
How it works: Uses statistical models to estimate project parameters based on historical data and project attributes
(e.g., size, complexity).
Advantages:
Disadvantages:
How it works: A software cost estimation model that uses a regression model based on lines of code (LOC) and other
factors.
Advantages:
Disadvantages:
Experience and Expertise: The accuracy of empirical estimation depends on the experience and knowledge of the
estimators.
Project Similarity: The more similar a project is to past projects, the more accurate the estimates will be.
Data Quality: The quality and reliability of historical data are crucial for accurate estimation.
COCOMO Model:
Boehm proposed COCOMO (Constructive Cost Estimation Model) in 1981.COCOMO is one of the most generally
used software estimation models in the world. COCOMO predicts the efforts and schedule of a software product
based on the size of the software.
The necessary steps in this model are:
1. Get an initial estimate of the development effort from evaluation of thousands of delivered lines of source
code (KDLOC).
2. Determine a set of 15 multiplying factors from various attributes of the project.
3. Calculate the effort estimate by multiplying the initial estimate with all the multiplying factors i.e., multiply
the values in step1 and step2.
The initial estimate (also called nominal estimate) is determined by an equation of the form used in the static single
variable models, using KDLOC as the measure of the size. To determine the initial effort Ei in person-months the
equation used is of the type is shown below
Ei=a*(KDLOC)b
The value of the constant a and b are depends on the project type.
In COCOMO, projects are categorized into three types:
1. Organic
2. Semidetached
3. Embedded
1.Organic: A development project can be treated of the organic type, if the project deals with developing a well-
understood application program, the size of the development team is reasonably small, and the team members are
experienced in developing similar methods of projects. Examples of this type of projects are simple business
systems, simple inventory management systems, and data processing systems.
2. Semidetached: A development project can be treated with semidetached type if the development consists of a
mixture of experienced and inexperienced staff. Team members may have finite experience in related systems but
may be unfamiliar with some aspects of the order being developed. Example of Semidetached system includes
developing a new operating system (OS), a Database Management System (DBMS), and complex inventory
management system.
3. Embedded: A development project is treated to be of an embedded type, if the software being developed is
strongly coupled to complex hardware, or if the stringent regulations on the operational method exist. For
Example: ATM, Air Traffic control.
For three product categories, Bohem provides a different set of expression to predict effort (in a unit of person
month)and development time from the size of estimation in KLOC(Kilo Line of code) efforts estimation takes into a
According to Boehm, software cost estimation should be done through three stages:
1. Basic Model
2. Intermediate Model
3. Detailed Model
ccount the productivity loss due to holidays, weekly off, coffee breaks, etc.
1. Basic COCOMO Model: The basic COCOMO model provide an accurate size of the project parameters. The
following expressions give the basic COCOMO estimation model:
Effort=a1*(KLOC) a2 PM
Tdev=b1*(efforts)b2 Months
Where
KLOC is the estimated size of the software product indicate in Kilo Lines of Code,
a1,a2,b1,b2 are constants for each group of software products,
Tdev is the estimated time to develop the software, expressed in months,
Effort is the total effort required to develop the software product, expressed in person months (PMs).
Estimation of development effort
For the three classes of software products, the formulas for estimating the effort based on the code size are shown
below:
Organic: Effort = 2.4(KLOC) 1.05 PM
Semi-detached: Effort = 3.0(KLOC) 1.12 PM
Embedded: Effort = 3.6(KLOC) 1.20 PM
Estimation of development time
For the three classes of software products, the formulas for estimating the development time based on the effort
are given below:
Organic: Tdev = 2.5(Effort) 0.38 Months
Semi-detached: Tdev = 2.5(Effort) 0.35 Months
Embedded: Tdev = 2.5(Effort) 0.32 Months
Example1: Suppose a project was estimated to be 400 KLOC. Calculate the effort and development time for each of
the three model i.e., organic, semi-detached & embedded.
Solution: The basic COCOMO equation takes the form:
Effort=a1*(KLOC) a2 PM
Tdev=b1*(efforts)b2 Months
Estimated Size of project= 400 KLOC
(i)Organic Mode
E = 2.4 * (400)1.05 = 1295.31 PM
D = 2.5 * (1295.31)0.38=38.07 PM
(ii)Semidetached Mode
E = 3.0 * (400)1.12=2462.79 PM
D = 2.5 * (2462.79)0.35=38.45 PM
(iii) Embedded Mode
E = 3.6 * (400)1.20 = 4772.81 PM
D = 2.5 * (4772.8)0.32 = 38 PM
Example2: A project size of 200 KLOC is to be developed. Software development team has average experience on
similar type of projects. The project schedule is not very tight. Calculate the Effort, development time, average staff
size, and productivity of the project.
Solution: The semidetached mode is the most appropriate mode, keeping in view the size, schedule and experience
of development time.
Hence E=3.0(200)1.12=1133.12PM
D=2.5(1133.12)0.35=29.3PM
P = 176 LOC/PM
2. Intermediate Model: The basic Cocomo model considers that the effort is only a function of the number of lines
of code and some constants calculated according to the various software systems. The intermediate COCOMO
model recognizes these facts and refines the initial estimates obtained through the basic COCOMO model by using a
set of 15 cost drivers based on various attributes of software engineering.
Halstead's Software Science:
Halstead's Software Science is a set of software metrics developed by Maurice Halstead in the 1970s to measure the
complexity of a software program. These metrics are based on the number of distinct operators and operands in the
program.
Key Metrics:
1. Program Length (N):
o Total number of operators and operands in the program.
o N = N1 + N2
2. Program Vocabulary (n):
o Number of unique operators (n1) and operands (n2) in the program.
o n = n1 + n2
3. Program Volume (V):
o Measure of the program's size in bits.
o V = N * log2(n)
4. Program Difficulty (D):
o Measure of the program's complexity.
o D = (n1/2) * (N2/n2)
5. Program Effort (E):
o Estimated effort required to develop the program.
o E=D*V
6. Program Level (L):
o Inverse of program difficulty.
o L = 1/D
7. Program Time (T):
o Estimated time required to develop the program.
o T = E/S, where S is a constant representing the average time required to make a mental decision.
How to Calculate Halstead Metrics:
1. Identify Operators and Operands:
o Operators are symbols like +, -, *, /, =, etc.
o Operands are variables, constants, and function calls.
2. Count Unique Operators and Operands:
o Count the number of unique operators (n1) and operands (n2).
3. Count Total Occurrences:
o Count the total number of occurrences of operators (N1) and operands (N2).
4. Calculate Metrics:
o Use the formulas above to calculate the various Halstead metrics.
Applications of Halstead Metrics:
Predicting Software Quality: Higher values of difficulty and effort indicate a more complex and error-prone
program.
Estimating Development Effort: Can be used to estimate the time and resources required for software
development.
Measuring Software Maintainability: Higher values of volume and difficulty indicate a less maintainable
program.
Evaluating the Impact of Code Changes: Can be used to assess the impact of code modifications on the
overall complexity and quality of the software.
While Halstead's metrics have been widely used, their accuracy can be limited by factors such as programming
language, coding style, and the complexity of the algorithms involved. It's important to use these metrics in
conjunction with other software metrics and expert judgment to get a comprehensive understanding of software
quality.
. Risk Management: A Comprehensive Overview
Risk management is a systematic process of identifying, assessing, and controlling risks. It involves taking proactive
steps to minimize potential negative impacts and maximize opportunities
Key Steps in Risk Management
1. Risk Identification:
o Identifying potential risks that could impact the project or organization.
o Brainstorming, checklists, and SWOT analysis can be used.
2. Risk Assessment:
o Evaluating the likelihood and potential impact of each identified risk.
o This involves assigning probability and severity ratings to each risk.
3. Risk Prioritization:
o Ranking risks based on their potential impact and likelihood of occurrence.
o This helps focus efforts on the most critical risks.
4. Risk Response Planning:
o Developing strategies to address each risk:
Risk Avoidance: Eliminating the risk altogether.
Risk Reduction: Implementing measures to reduce the likelihood or impact of the risk.
Risk Transfer: Shifting the risk to a third party (e.g., insurance).
Risk Acceptance: Accepting the risk and monitoring it closely.
5. Risk Monitoring and Control:
o Continuously monitoring risks and taking corrective actions as needed.
o Tracking risk mitigation strategies and adjusting them as circumstances change.
Common Risk Management Tools and Techniques
SWOT Analysis: Identifying strengths, weaknesses, opportunities, and threats.
Risk Assessment Matrix: A visual tool to prioritize risks based on their likelihood and impact.
Risk Register: A document that lists all identified risks, their assessments, and response plans.
Risk Breakdown Structure (RBS): A hierarchical breakdown of project risks.
Monte Carlo Simulation: A statistical technique to model uncertainty and variability in project parameters.
Why is Risk Management Important?
Reduced Losses: Proactive risk management can help minimize financial losses and damage to reputation.
Improved Decision-Making: By understanding potential risks, organizations can make more informed
decisions.
Increased Efficiency: Effective risk management can streamline processes and improve operational
efficiency.
Enhanced Reputation: By proactively addressing risks, organizations can build trust and credibility.
Regulatory Compliance: Risk management can help organizations comply with relevant regulations and
standards.
By effectively implementing risk management practices, organizations can increase their resilience, achieve their
goals, and create a sustainable future.
Requirements Analysis And Specification:
Requirements Analysis and Specification (RAS) - Overview
Requirements Analysis:
Objective: Understand and define what a system needs to do (functional and non-functional
requirements).
Steps:
1. Gather information from stakeholders through interviews, surveys, or observations.
2. Identify and document user needs, system constraints, and goals.
3. Analyze the feasibility, completeness, and clarity of requirements.
4. Prioritize requirements based on importance and impact.
Specification:
Objective: Create a formal, structured document that precisely defines the requirements.
Key Elements:
o Functional Requirements: What the system should do.
o Non-functional Requirements: Performance, scalability, security, etc.
o Interfaces: User interactions and system integrations.
o Constraints: Legal, environmental, or technological limitations.
Purpose: Serves as a reference for development, testing, and validation.
Importance:
Aligns stakeholders’ expectations.
Provides a clear roadmap for developers.
Reduces misunderstandings and errors during the development process.
Requirements gathering and analysis is a critical phase in the software development lifecycle where the primary goal
is to understand and document the needs and expectations of stakeholders. This process ensures the software
meets its intended purpose and avoids costly rework later.
Key Objectives
1. Identify Requirements: Discover what the stakeholders need the system to do (functional requirements) and the
conditions under which it must perform (non-functional requirements).
2. Understand Stakeholders: Recognize the needs of various stakeholders such as customers, end-users, managers, and
developers.
3. Resolve Conflicts: Address and reconcile differences in expectations among stakeholders.
4. Document Requirements: Provide a clear and structured format for requirements, serving as a reference throughout
the project.
Steps in Requirements Gathering and Analysis
1. Elicitation:
o Techniques to collect requirements:
Interviews: Engage stakeholders in one-on-one or group discussions.
Surveys and Questionnaires: Gather inputs from a large number of stakeholders quickly.
Workshops: Collaborative sessions to identify requirements in a structured manner.
Observation: Monitor end-users in their work environment to identify needs they may not
articulate.
Document Analysis: Study existing documentation, such as business processes or legacy systems, for
relevant requirements.
2. Analysis:
o Classify requirements into categories (e.g., functional, non-functional, and domain-specific).
o Prioritize requirements based on importance, feasibility, and stakeholder goals.
o Use techniques like prototyping or modeling (e.g., Use Case Diagrams, Data Flow Diagrams) to validate and
refine requirements.
3. Specification:
o Create a Software Requirements Specification (SRS) document.
o Ensure requirements are clear, complete, consistent, and traceable.
4. Validation:
o Verify that requirements accurately represent stakeholder needs.
o Conduct reviews or walkthroughs with stakeholders and development teams.
5. Management:
o Track and manage changes to requirements as the project progresses. Use tools like requirement traceability
matrices.
Challenges in Requirements Gathering and Analysis
1. Ambiguous Requirements: Stakeholders may provide vague or conflicting information.
2. Incomplete Information: Stakeholders may not know or understand all their needs initially.
3. Communication Barriers: Language or technical understanding differences may hinder effective communication.
4. Changing Requirements: Needs may evolve due to market changes or new insights.
What is an SRS?
A Software Requirements Specification (SRS) is a detailed document that describes the functional and non-functional
requirements of a software system. It serves as a blueprint for the development team, testers, and stakeholders to ensure
that everyone has a shared understanding of what the software will do.
Why is SRS Important?
1. Clarity: Ensures that all stakeholders have a clear understanding of what the system should achieve.
2. Reference Document: Acts as a guide for developers, testers, and project managers throughout the software
development lifecycle.
3. Minimizes Miscommunication: Reduces misunderstandings between stakeholders and the development team.
4. Basis for Validation: Ensures the software meets user expectations and requirements.
Components of an SRS
An SRS typically includes the following sections:
1. Introduction:
o Purpose: States the purpose of the software and the SRS document.
o Scope: Describes what the software will do and its boundaries.
o Definitions, Acronyms, and Abbreviations: Explains technical terms or abbreviations used in the document.
o References: Lists any related documents, standards, or resources.
2. Overall Description:
o Product Perspective: Explains how the software fits into existing systems or business processes.
o Product Functions: Summarizes the main functionalities of the system.
o User Characteristics: Describes the target audience (e.g., technical or non-technical users).
o Constraints: Lists restrictions, such as hardware limitations or legal regulations.
o Assumptions and Dependencies: States assumptions about the system environment or dependent
components.
3. Functional Requirements:
o Describes what the system must do in detail, often presented as use cases or user stories.
o Example: "The system shall allow users to log in using their email and password."
4. Non-Functional Requirements:
o Specifies the quality attributes of the system.
o Examples:
Performance: "The system should handle 1,000 simultaneous users."
Security: "User passwords must be encrypted."
Usability: "The interface should be accessible to visually impaired users."
5. System Requirements:
o Details hardware, software, and platform requirements.
o Example: "The system will run on Windows 10 and Linux Ubuntu 20.04."
6. External Interface Requirements:
o Defines how the system interacts with external components (e.g., APIs, databases, or other software).
o Example: "The system will connect to a payment gateway for transactions."
7. Use Cases (Optional):
o Illustrates how users interact with the system through specific scenarios.
o Example: A use case for "Search Products" might include steps the user takes to find an item.
8. Appendices (Optional):
o Includes additional information, diagrams, or references to support the document.
Characteristics of a Good SRS
1. Complete: Covers all requirements and leaves no ambiguity.
2. Consistent: Does not contain conflicting requirements.
3. Clear: Written in simple, precise language.
4. Modifiable: Easy to update as requirements change.
5. Verifiable: Each requirement can be tested to confirm it is met.
Example of SRS Structure:
1. Introduction
Purpose: To build an e-commerce platform.
Scope: Users can browse, search, and purchase products online.
2. Functional Requirements
The system shall allow users to register and log in.
Users shall be able to search for products by category.
3. Non-Functional Requirements
The system shall respond to user queries within 2 seconds.
The platform must support up to 10,000 users simultaneously.
4. External Interface Requirements
The system will use PayPal for payment processing.
While Software Requirements Specification (SRS) is essential for ensuring a project's success, a poorly written or "bad" SRS
can cause significant problems. Below are some characteristics and issues of a bad SRS:
Characteristics of a Bad SRS
1. Ambiguity:
o Requirements are unclear or open to multiple interpretations.
o Example: "The system should be fast" (What defines "fast"?).
2. Incomplete Requirements:
o Missing details about key functionalities, constraints, or system behavior.
o Example: Describing a login feature but omitting password recovery.
3. Inconsistencies:
o Conflicting requirements within the document.
o Example: One section states the system should support 1,000 users, while another says 5,000.
4. Overloaded with Technical Jargon:
o Written in overly complex language, making it difficult for non-technical stakeholders to understand.
5. No Prioritization of Requirements:
o All requirements are treated equally, leaving the team unsure of what is critical or optional.
6. Lack of Non-Functional Requirements:
o Neglecting performance, security, or usability specifications.
o Example: No mention of how fast the system should respond under load.
7. No Traceability:
o Requirements are not traceable to user needs, making it hard to verify if they meet project goals.
8. Too Vague or Too Detailed:
o Vague: Requirements are too broad, lacking specifics.
Example: "The system should be user-friendly."
o Overly Detailed: Describes unnecessary implementation details instead of high-level requirements.
Example: Specifying programming language choices instead of system behavior.
9. Unrealistic Requirements:
o Includes features or performance expectations that are not feasible within the project's scope, budget, or
timeline.
10. No Validation or Acceptance Criteria:
o Does not define how requirements will be verified or tested.
o Example: A requirement says, "The system shall prevent unauthorized access," without specifying how this
will be tested.
Example of a Bad SRS
Login System - Bad SRS Example:
The system should allow users to log in.
The system should be secure.
The system should be user-friendly.
How to Avoid a Bad SRS
1. Use Clear Language:
o Avoid vague terms like "fast," "secure," or "user-friendly." Be specific and measurable.
o Example: Replace "The system should be fast" with "The system should respond within 2 seconds for 90% of
user queries."
2. Include Complete Details:
o Address all functional and non-functional requirements comprehensively.
o Example: Specify "The login feature must allow email and password input with a maximum of three failed
attempts before locking out."
3. Verify Consistency:
o Cross-check the document to ensure there are no contradictions.
4. Prioritize Requirements:
o Clearly distinguish between critical (must-have) and optional (nice-to-have) features.
5. Include Validation Criteria:
o Specify how each requirement will be tested or validated.
o Example: "The system shall encrypt passwords using AES-256, verified during testing by inspecting the
database."
6. Regular Reviews:
o Collaborate with stakeholders to review and refine the SRS iteratively.
text{AccessDashboard}(u)
3. State Machines:
o Describes the system as a series of states and transitions triggered by events.
o Example:
States: LoggedOut, LoggedIn.
Transition: Login → changes state from LoggedOut to LoggedIn.
4. Algebraic Specifications:
o Defines system operations and their effects using algebraic equations.
o Example: For a queue data structure:
enqueue(x,emptyQueue)=queue(x)\text{enqueue}(x, \text{emptyQueue}) = \text{queue}(x)
dequeue(enqueue(x,q))=q\text{dequeue}(\text{enqueue}(x, q)) = q
5. Z Notation:
o A formal language based on set theory and predicate logic.
o Example:
o State ::= [ Users: \mathcal{P} User | \#Users \leq 1000 ]
6. Petri Nets:
o Graphical tool used to describe distributed systems with states and events.
Steps in Creating a Formal Specification
1. Understand the System Requirements:
o Gather detailed information about what the system should do.
2. Define the State:
o Identify key data elements and their relationships.
3. Describe Operations:
o Specify actions, their preconditions, and postconditions.
4. Model System Behavior:
o Use mathematical or graphical methods to describe transitions and constraints.
5. Validate the Specification:
o Use proofs or tools to ensure consistency and correctness.
Advantages of Formal Specifications
1. Clarity: Removes ambiguities and misunderstandings.
2. Early Problem Detection: Identifies inconsistencies or incomplete requirements.
3. Improves Reliability: Ensures the system meets its intended purpose.
4. Enables Automation: Can be used with tools to automate verification and testing.
Disadvantages of Formal Specifications
1. Complexity: Requires advanced mathematical knowledge.
2. Time-Consuming: Writing and validating formal specifications can be slow.
3. Not Always Necessary: May be overkill for small or simple systems.
Example: Formal Specification of a Banking System
Problem Statement: A banking system allows users to deposit and withdraw money.
Formal Specification:
1. State Definition:
Balance∈R\text{Balance} \in \mathbb{R} (Real numbers, where Balance≥0\text{Balance} \geq 0)
2. Deposit Operation:
o Precondition: amount>0\text{amount} > 0
o Postcondition: Balance=Balance+amount\text{Balance} = \text{Balance} + \text{amount}
3. Withdraw Operation:
o Precondition: amount>0∧amount≤Balance\text{amount} > 0 \land \text{amount} \leq \text{Balance}
o Postcondition: Balance=Balance−amount\text{Balance} = \text{Balance} - \text{amount}
Executable Specification
What is an Executable Specification?
An Executable Specification is a method in software development where the specification itself is written in a form that can
be directly executed, tested, and verified by a computer. It is not just a document describing what the system should do, but
a working model that performs the described behavior.
This approach helps bridge the gap between design and implementation, ensuring that the system behaves exactly as
specified.
Key Features of Executable Specifications
1. Direct Execution:
o The specification can be run as a program to simulate or test the system.
2. Rapid Prototyping:
o Developers can create prototypes quickly to validate requirements and behavior.
3. Verification and Validation:
o The specification can be used to verify the correctness of the system and validate it against user
requirements.
4. Readability:
o Written in a high-level language, making it easier for stakeholders to understand.
Advantages of Executable Specifications
1. Improved Communication:
o Stakeholders can see a working version of the system early in development.
2. Reduced Ambiguity:
o Since the specification is executable, it eliminates misunderstandings.
3. Continuous Testing:
o The specification itself acts as a test suite.
4. Faster Iterations:
o Prototypes can be quickly modified based on feedback.
Disadvantages of Executable Specifications
1. Complexity:
o Writing executable specifications requires familiarity with high-level programming or domain-specific
languages.
2. Time-Consuming:
o Creating an executable specification might take more time initially than writing a traditional document.
3. Overhead:
o Maintaining an executable specification alongside implementation code can be challenging.
Example
For an ATM system, an executable specification might describe how a user interacts with the system (e.g., inserting a card,
entering a PIN, withdrawing money) using a high-level simulation language like Python or a domain-specific tool like
Stateflow (used for modeling state machines).
2 MARKS QUESTIONS
8. What are the two main activities in requirements gathering and analysis?
14. List two types of requirements that are typically included in an SRS document.
10 MARKS QUESTIONS
1. Describe the different types of project estimation techniques, including top-down and bottom-up estimation. Explain the
advantages and disadvantages of each technique and provide examples.
2. Explain the COCOMO model and its application in software project estimation. Discuss the different modes of COCOMO
(organic, semi-detached, and embedded) and their characteristics.
3. Discuss the importance of risk management in software project management. Describe the different types of risks that can
affect a software project and explain how to identify, assess, and mitigate them.
4. Describe the different types of project scheduling techniques, including Gantt charts, PERT charts, and critical path
method. Explain the advantages and disadvantages of each technique and provide examples.
5. Explain the concept of earned value management (EVM) and its application in software project management. Discuss the
different metrics used in EVM, including earned value, planned value, and actual cost.
6. Describe the different types of requirements gathering techniques, including interviews, surveys, and observation. Explain
the advantages and disadvantages of each technique and provide examples.
7. Explain the importance of formal system specification in software development. Describe the different types of formal
specification techniques, including axiomatic and algebraic specification.
8. Discuss the concept of Software Requirements Specification (SRS) and its importance in software development. Describe
the different components of an SRS document and explain how to write an effective SRS.
9. Describe the different types of requirements analysis techniques, including use case analysis and data flow diagramming.
Explain the advantages and disadvantages of each technique and provide examples.
10. Explain the concept of executable specification and its application in software development. Discuss the different types of
executable specification techniques, including model-driven development and test-driven development.