Unit 2 Notes
Unit 2 Notes
In software engineering, requirements define what a system should do and how it should behave. They
serve as a foundation for software development, ensuring that the final product meets user needs and
business goals. Requirements help stakeholders, developers, and testers understand what is expected from
the software, minimizing errors and misunderstandings during development. Without well-defined
requirements, software projects may fail due to unclear expectations, scope creep, or poor system
performance.
Software requirements are classified into four main categories: functional requirements, non-functional
requirements, user requirements, and system requirements. Each category plays a critical role in
software development.
1. Functional Requirements
Functional requirements specify what the system should do. These requirements define the system's core
features and operations that fulfill its intended purpose.
Key Characteristics:
Examples:
• An ATM system should allow users to withdraw cash, check their account balance, and transfer
funds.
• An e-commerce platform should enable users to add products to the cart, make payments, and
track orders.
• A library management system should allow users to search for books, issue books, and return
books.
2. Non-Functional Requirements
Non-functional requirements define how the system should perform rather than what it does. They focus
on quality attributes such as performance, security, reliability, and usability.
Key Characteristics:
Examples:
3. User Requirements
User requirements describe the expectations and needs of end users in a simple and non-technical manner.
They serve as a bridge between stakeholders and developers, ensuring the system meets user expectations.
Key Characteristics:
Examples:
• A customer on an e-commerce website wants an easy checkout process with multiple payment
options.
• A student using an online exam system wants to receive instant feedback on their answers.
• An ATM user wants the machine to provide receipt printing and support multiple languages.
4. System Requirements
System requirements define the technical specifications and constraints necessary for the software to
function properly. These are typically written for developers, system architects, and IT administrators.
Key Characteristics:
Examples:
• A banking application should run on Windows Server 2019 with 8GB RAM and 100GB
storage.
• An ATM system should operate on a Linux-based OS with 512MB RAM.
• A mobile application should be compatible with Android 10 and iOS 14 or later.
Interface Specification
An Interface Specification defines how different software components, systems, or external devices
communicate with each other. It provides a detailed description of the inputs, outputs, data formats, and
protocols used in these interactions.
Example Scenario:
Imagine an online payment system integrated with an e-commerce website. The interface specification
will define:
• Inputs: The website sends user details, order amount, and payment method to the payment
gateway.
• Processing: The payment gateway validates the transaction.
• Outputs: The payment gateway sends a response (Success or Failure) to the website.
A Software Requirements Document (SRD) is a comprehensive document that outlines all the
requirements of a software system. It serves as a guide for developers, testers, project managers, and
stakeholders. The SRD ensures that everyone involved in the project understands what the software is
supposed to do and how it should function.
Example: Software Requirements Document (SRD) for Library Management System (LMS)
1. Introduction
1.1 Purpose
The purpose of the Library Management System (LMS) is to digitalize library operations, allowing
students and staff to manage books efficiently. The system enables users to search, borrow, return, and
reserve books online. It also provides librarians with tools to manage inventory and track due dates.
1.2 Scope
• Students to search for books, borrow books, and check due dates.
• Librarians to manage book inventory and track book availability.
• Administrators to handle user accounts and system configurations.
The system will be web-based and accessible via desktop and mobile browsers.
This document is intended for developers, testers, project managers, and stakeholders involved in the
development of the LMS.
• LMS (Library Management System) – The software system managing library books and users.
• ISBN (International Standard Book Number) – A unique identifier for books.
• GUI (Graphical User Interface) – The visual part of the system that users interact with.
2. Functional Requirements
• Users should be able to search for books by title, author, ISBN, or category.
• Users should be able to filter books based on availability and genre.
• Librarians should be able to add, update, or remove books from the system.
• The system should allow tracking of overdue books and fines.
3. Non-Functional Requirements
• The system should be user-friendly and accessible on both desktop and mobile browsers.
• The interface should follow WCAG 2.1 accessibility standards.
4. System Requirements
5. Interfaces
Flow:
Postcondition: The book is assigned to the student and unavailable for others.
7. Assumptions
8. Constraints
9. Acceptance Criteria
• The system should allow students to search, borrow, and return books.
• Students should receive email notifications for overdue books.
• Librarians should be able to add, update, and delete books.
• The system should support at least 1,000 concurrent users without performance issues.
• Security protocols (encryption, authentication) must be properly implemented.
10. Appendix
The Requirements Engineering (RE) process is a fundamental phase in software development that
focuses on gathering, analyzing, documenting, and validating the needs of stakeholders. It ensures that the
final software system meets business goals, user expectations, and technical constraints. A well-defined RE
process reduces errors, improves project success rates, and minimizes costly rework during later stages of
development.
1. Requirements Elicitation
Definition
Requirements elicitation is the process of gathering information about what stakeholders need from a
system. It involves communication with users, customers, developers, and other involved parties to identify
their expectations and constraints.
Process
Example
Consider a university planning to develop an online course registration system. The requirements
elicitation phase would involve:
• Interviewing students to understand how they select and register for courses.
• Consulting faculty members to know how they manage course capacity.
• Observing the manual process of course registration to identify inefficiencies.
• Developing a prototype and getting feedback from students.
Definition
Once requirements are gathered, they must be analyzed to resolve conflicts, prioritize needs, and ensure
feasibility. Sometimes, different stakeholders may have conflicting demands, so negotiation is necessary
to reach a compromise.
Process
Example
In the university course registration system, students may request an automatic waitlist feature, but
faculty might prefer manual approvals for over-enrolled courses. The analysis phase will determine
whether both requests can be implemented and negotiate a solution (e.g., automated waitlisting with manual
override options).
3. Requirements Specification
Definition
Once the requirements are analyzed and finalized, they must be formally documented in a structured
format known as the Software Requirements Specification (SRS) document.
• Functional Requirements: What the system should do (e.g., "The system must allow students to
enroll in up to five courses per semester").
• Non-functional Requirements: Quality aspects like security, performance, and usability (e.g.,
"The system must handle 10,000 concurrent users").
• Assumptions and Constraints: Conditions that affect development, such as budget limitations or
regulatory compliance.
• System Interfaces: Integration details with external systems.
Example
• Functional Requirement: "The system shall allow students to add or drop courses before the
semester starts."
• Non-functional Requirement: "The system shall respond to user queries within 2 seconds."
• Constraint: "The system must be compatible with existing university databases."
Definition
Techniques Used
Example
5. Requirements Management
Definition
Example
If the university decides to introduce AI-based course recommendations for students, the original SRS
document must be updated to include this new requirement. The development team would evaluate the
impact of this change and implement necessary modifications.
• Unclear Requirements: Stakeholders may not always know what they want.
• Changing Requirements: Business needs can evolve during development.
• Conflicting Stakeholder Needs: Different user groups may have different expectations.
• Limited User Involvement: If users are not actively engaged, the system may not meet their needs.
A Feasibility Study is an initial assessment conducted before starting a software development project. Its
purpose is to analyze whether the proposed system is practical, achievable, and beneficial for the
organization. It helps stakeholders decide whether to proceed with development or explore alternative
solutions.
A feasibility study is conducted across different aspects to ensure the project's success. The five major types
of feasibility are:
1. Technical Feasibility
This examines whether the technology, tools, and infrastructure required for the project are available and
capable of supporting the system.
Key Considerations:
Example:
A company wants to develop an AI-powered chatbot for customer support. The feasibility study will check
if the company has access to Natural Language Processing (NLP) tools, servers for high data processing,
and skilled developers to build the chatbot.
This determines whether the financial benefits of the system outweigh the costs of development,
implementation, and maintenance.
Key Considerations:
• How much will it cost to develop, deploy, and maintain the system?
• What are the expected financial benefits (e.g., increased revenue, cost savings)?
• Is there a budget available for the project?
Example:
A university wants to replace its manual library system with a digital LMS. The feasibility study will
compare the development costs, server costs, and training expenses with the savings in administrative
work and improved efficiency.
3. Operational Feasibility
This assesses whether the system will function effectively within the organization and if users will be
willing to adopt it.
Key Considerations:
Example:
A hospital plans to implement electronic health records (EHR) to replace paper-based records. The
feasibility study will check if doctors, nurses, and administrative staff are comfortable using digital
systems and whether training is necessary.
4. Legal Feasibility
This examines whether the project complies with legal, regulatory, and security requirements.
Key Considerations:
• Does the system comply with data protection laws (e.g., GDPR, HIPAA)?
• Are there any licensing restrictions for the software being used?
• Does the project follow intellectual property (IP) laws?
Example:
A financial institution developing an online banking system must ensure that the software complies with
banking regulations, cybersecurity policies, and data privacy laws.
This evaluates whether the project can be completed within the required timeframe without affecting
other business operations.
Key Considerations:
Example:
A retail company wants an e-commerce website ready before the holiday season. The feasibility study
will determine if the development, testing, and deployment can be completed in time.
1. Identify Objectives: Define the goals of the project and what needs to be achieved.
2. Gather Requirements: Collect business, user, and technical requirements.
3. Analyze Different Feasibility Aspects: Evaluate the technical, economic, operational, legal,
and schedule feasibility.
4. Identify Risks and Challenges: List potential risks, such as budget overruns, technology
limitations, or legal issues.
5. Prepare a Feasibility Report: Document the findings and provide a recommendation on
whether to proceed with the project.
Estimating the effort and cost of a software project is a crucial aspect of software engineering. Accurate
estimation ensures that projects are delivered on time, within budget, and with the required quality. One
of the most widely used models for estimating effort, cost, and development time is the COCOMO
(COnstructive COst MOdel) Model I, developed by Barry Boehm in 1981.
COCOMO I is a mathematical model that estimates the effort (in person-months), cost, and time
required to develop a software project based on its size (measured in KLOC – thousands of lines of code).
It provides a structured way to calculate effort and cost based on past project data and empirical
relationships.
COCOMO I is a hierarchical model that estimates software effort and cost in three different modes:
Each mode has a different mathematical equation for estimating effort (E), development time (T), and
staffing needs.
where:
where:
Mode a b c d
Organic 2.4 1.05 2.5 0.38
Semi-Detached 3.0 1.12 2.5 0.35
Embedded 3.6 1.20 2.5 0.32
Scenario
A software company is developing a library management system. Based on similar past projects, the
estimated size of the software is 50 KLOC (50,000 lines of code). The project is classified as Semi-
Detached, meaning it involves a mix of new and experienced developers.
E = 3.0 × (50)^1.12
E = 3.0 × 65.36
E = 196.08 person-months
So, the effort required is approximately 196 person-months (i.e., if one person works alone, it will take
196 months).
T = 2.5 × (196.08)^0.35
T = 2.5×7.82
T = 19.55 months
So, the company should allocate around 10 developers to complete the project on time.
Advantages of COCOMO I
Limitations of COCOMO I
• Does not consider modern software development methods like Agile and DevOps.
• Assumes that software size (KLOC) is known in advance, which is difficult in the early stages.
• Does not consider external factors like team productivity, tool efficiency, or market changes.
1. Basic COCOMO Model – Provides a rough estimate using only software size.
2. Intermediate COCOMO Model – Improves estimation by considering additional cost drivers
(e.g., team experience, hardware constraints).
3. Complete (Detailed) COCOMO Model – Extends the Intermediate model by applying cost
drivers to individual project phases (e.g., design, coding, testing).
Overview
The Intermediate COCOMO model refines the Basic model by introducing 15 cost drivers that influence
project effort and cost. These cost drivers account for factors like team expertise, complexity, reliability
requirements, and development tools.
where:
Each factor has an Effort Multiplier (EM) value that ranges from very low to very high based on its
impact. The EM values associated with these levels are as follows:
Cost Driver Very Low Low Nominal High Very High Extra High
Product Attributes
Required Software Reliability (RELY) 0.75 0.88 1.00 1.15 1.40 —
Database Size (DATA) — 0.94 1.00 1.08 1.16 —
Product Complexity (CPLX) 0.70 0.85 1.00 1.15 1.30 1.66
Computer Attributes
Execution Time Constraint (TIME) — — 1.00 1.11 1.30 1.66
Main Storage Constraint (STOR) — — 1.00 1.06 1.21 1.56
Platform Volatility (PVOL) 0.87 0.94 1.00 1.07 1.15 —
Personnel Attributes
Analyst Capability (ACAP) 1.46 1.19 1.00 0.86 0.71 —
Programmer Capability (PCAP) 1.42 1.17 1.00 0.86 0.70 —
Personnel Continuity (PCON) 1.29 1.12 1.00 0.90 0.81 —
Application Experience (APEX) 1.22 1.10 1.00 0.88 0.81 —
Project Attributes
Use of Software Tools (TOOL) 1.24 1.10 1.00 0.91 0.82 —
Development Schedule (SCED) 1.23 1.08 1.00 1.04 1.10 —
Multisite Development (SITE) 1.25 1.10 1.00 0.92 0.84 —
Required Development Flexibility (FLEX) 1.29 1.12 1.00 0.90 0.81 —
Scenario
A company is developing a Hospital Management System (HMS) with an estimated 100 KLOC. The
project is Semi-Detached, and cost drivers are considered.
Overview
The Complete COCOMO model extends the Intermediate model by applying cost drivers at each phase
of the project (e.g., requirements, design, coding, testing). This provides more granular estimates and
helps in resource allocation.
• Instead of applying a single effort multiplier to the entire project, the complete model breaks
down the project into phases.
• Each phase has different cost drivers. For example:
o Design phase may have high complexity.
o Coding phase may have low programmer experience.
o Testing phase may have strict reliability requirements.
Scenario
A Banking Software System is being developed with 200 KLOC in an Embedded mode. The
Intermediate model effort was calculated as 1500 person-months.
COCOMO II Model
Introduction
COCOMO II (Constructive Cost Model II) is an enhanced version of COCOMO I, developed by Barry
Boehm in the 1990s. It was designed to improve effort and cost estimation for modern software projects,
addressing the limitations of COCOMO I. Unlike COCOMO I, which was primarily focused on traditional
waterfall projects, COCOMO II supports:
✅ Object-Oriented Development
✅ Agile and Iterative Models
✅ Commercial-Off-The-Shelf (COTS) Software
✅ Reused and Reengineered Code
COCOMO II consists of three different models based on the stage of software development:
Example:
A startup developing a mobile app prototype with a heavy focus on drag-and-drop GUI elements would
use this model.
Example:
A company is developing a customer relationship management (CRM) system. Before finalizing the
design, it uses the Early Design Model to estimate the effort needed.
Equation:
Where:
Example:
A banking software system has completed its design phase, and detailed requirements are available. The
company now uses the Post-Architecture Model to estimate coding, testing, and maintenance efforts.
Equation:
Where, the values for A, B and EM are refined using modern software metrics.
COCOMO II refines the cost drivers used in COCOMO I, increasing them to 17 effort multipliers across
five categories:
1. Product Factors
2. Platform Factors
3. Personnel Factors
4. Project Factors
Each factor is assigned a value (Effort Multiplier - EM) between 0.5 (low impact) to 2.0 (high impact).
Advantages of COCOMO II
What is LOC?
Lines of Code (LOC) refers to the total number of non-comment, non-blank lines of source code written
in a software project. It is used to estimate effort, cost, and time required for development.
A simple inventory management system is expected to have 25,000 LOC (i.e., 25 KLOC).
A Function Point (FP) is a measure of the functionality provided to the user, rather than the number of
lines of code written. It is based on user requirements and system complexity.
UFP = (EI × weight) + (EO × weight) + (EQ × weight) + (ILF × weight) + (EIF × weight)
• 0 → No influence
• 1 → Incidental
• 2 → Moderate
• 3 → Average
• 4 → Significant
• 5 → Strong
Example Calculation
UFP = 15 + 20 + 18 + 45 + 14 = 112
Assume CAF = 30