Software Engineering
UNIT 1
What is Software Engineering?
Software Engineering is the process of designing, developing, testing, and maintaining software. It is
a systematic and disciplined approach to software development that aims to create high-quality,
reliable, and maintainable software.
1. Software engineering includes a variety of techniques, tools, and methodologies,
including requirements analysis, design, testing, and maintenance.
2. It is a rapidly evolving field, and new tools and technologies are constantly being developed
to improve the software development process.
3. By following the principles of software engineering and using the appropriate tools
and methodologies, software developers can create high-quality, reliable, and
maintainable software that meets the needs of its users.
4. Software Engineering is mainly used for large projects based on software systems rather
than single programs or applications.
5. The main goal of Software Engineering is to develop software applications for
improving quality, budget, and time efficiency.
6. Software Engineering ensures that the software that has to be built should be
consistent, correct, also on budget, on time, and within the required requirements.
Key Principles of Software Engineering
1. Modularity: Breaking the software into smaller, reusable components that can be
developed and tested independently.
2. Abstraction: Hiding the implementation details of a component and exposing only
the necessary functionality to other parts of the software.
3. Encapsulation: Wrapping up the data and functions of an object into a single unit,
and protecting the internal state of an object from external modifications.
4. Reusability: Creating components that can be used in multiple projects, which can save
time and resources.
5. Maintenance: Regularly updating and improving the software to fix bugs, add new
features, and address security vulnerabilities.
6. Testing: Verifying that the software meets its requirements and is free of bugs.
7. Design Patterns: Solving recurring problems in software design by providing templates
for solving them.
8. Agile methodologies: Using iterative and incremental development processes that focus on
customer satisfaction, rapid delivery, and flexibility.
9. Continuous Integration & Deployment: Continuously integrating the code changes
and deploying them into the production environment.
Main Attributes of Software Engineering
Software Engineering is a systematic, disciplined, quantifiable study and approach to the design,
development, operation, and maintenance of a software system. There are four main Attributes of
Software Engineering.
1. Efficiency: It provides a measure of the resource requirement of a software
product efficiently.
2. Reliability: It assures that the product will deliver the same results when used in
similar working environment.
3. Reusability: This attribute makes sure that the module can be used in multiple applications.
4. Maintainability: It is the ability of the software to be modified, repaired, or enhanced
easily with changing requirements.
Components of Software Characteristics
There are 6 components of Software Characteristics are discussed here. We will discuss each one
of them in detail.
Functionality
Functionality refers to the set of features and capabilities that a software program or system provides
to its users. It is one of the most important characteristics of software, as it determines the
usefulness of the software for the intended purpose. Examples of functionality in software include:
● Data storage and retrieval
● Data processing and manipulation
● User interface and navigation
● Communication and networking
● Security and access control
● Reporting and visualization
● Automation and scripting
Reliability
Reliability is a characteristic of software that refers to its ability to perform its intended functions
correctly and consistently over time.
Examples of factors that can affect the reliability of software include:
1. Bugs and errors in the code
2. Lack of testing and validation
3. Poorly designed algorithms and data structures
4. Inadequate error handling and recovery
5. Incompatibilities with other software or hardware
Efficiency
Efficiency is a characteristic of software that refers to its ability to use resources such as memory,
processing power, and network bandwidth in an optimal way. High efficiency means that a software
program can perform its intended functions quickly and with minimal use of resources, while low
efficiency means that a software program may be slow or consume excessive resources.
Examples of factors that can affect the efficiency of the software include:
1. Poorly designed algorithms and data structures
2. Inefficient use of memory and processing power
3. High network latency or bandwidth usage
4. Unnecessary processing or computation
5. Unoptimized code
Usability
It refers to the extent to which the software can be used with ease. the amount of effort or time
required to learn how to use the software.
Required functions are:
Maintainability
It refers to the ease with which modifications can be made in a software system to extend its
functionality, improve its performance, or correct errors.
Required functions are:
Portability
A set of attributes that bears on the ability of software to be transferred from one environment to
another, without minimum changes.
Required functions are:
What is Software Development Life Cycle (SDLC)?
SDLC is a process followed for software building within a software organization. SDLC consists of a
precise plan that describes how to develop, maintain, replace, and enhance specific software. The
life cycle defines a method for improving the quality of software and the all-around development
process.
Stages of the Software Development Life Cycle
SDLC specifies the task(s) to be performed at various stages by a software engineer or developer. It
ensures that the end product is able to meet the customer’s expectations and fits within the overall
budget. Hence, it’s vital for a software developer to have prior knowledge of this software
development process.
Software Development Models – SDLC Models
SDLC Models or Software Development Life Cycle (SDLC) models are frameworks that guide the
development process of software applications from initiation to deployment. Various SDLC models in
software engineering exist, each with its approach to the phases of development.
During the software development phase, various software development life cycle models are
specified and designed. To guarantee success at each stage of the software development process,
each process model adheres to a set of phases specific to its kind.
1. Waterfall SDLC Models
The Waterfall model follows a linear and sequential approach to software development. Each phase
in the development process must be completed before moving on to the next one, resembling the
downward flow of a waterfall. The model is highly structured, making it easy to understand and use.
Phases of Waterfall SDLC Models:
1. Requirements: The first phase involves gathering requirements from stakeholders
and analysing them to understand the scope and objectives of the project.
2. Design: Once the requirements are understood, the design phase begins. This involves
creating a detailed design document that outlines the software architecture, user interface,
and system components.
3. Development: The Development phase includes implementation involves coding the
software based on the design specifications. This phase also includes unit testing to
ensure that each component of the software is working as expected.
4. Testing: In the testing phase, the software is tested as a whole to ensure that it meets
the requirements and is free from defects.
5. Deployment: Once the software has been tested and approved, it is deployed to
the production environment.
6. Maintenance: The final phase of the Waterfall Model is maintenance, which involves fixing
any issues that arise after the software has been deployed and ensuring that it continues
to meet the requirements over time.
Advantages of the Waterfall SDLC Models:
● Simplicity: The linear and sequential nature of the Waterfall models makes it easy
to understand and implement.
● Clear Documentation: Each phase has its own set of documentation, making it easier to
track progress and manage the project.
● Stable Requirements: Well-suited for projects with stable and well-defined requirements at
the beginning.
● Predictability: Due to its structured nature, the Waterfall model allows for better
predictability in terms of timelines and deliverables.
Disadvantages of the Waterfall SDLC Models:
● Rigidity: The model is highly inflexible once a phase is completed, making it challenging to
accommodate changes.
● Late Testing: Testing is performed after the implementation phase, so defects might not
be discovered until late in the process.
● Limited Client Involvement: Clients are involved mainly in the initial phase, and
significant changes cannot be easily accommodated later in the development process.
● No Prototyping: The models lack the provision for creating prototypes, which could be a
disadvantage in projects where user feedback is crucial.
When to Use the Waterfall SDLC Models:
● Well-Defined Requirements: When project requirements are clear, stable, and unlikely to
change significantly.
● Small to Medium-Sized Projects: For smaller projects with straightforward objectives
and limited complexity.
2. Iterative SDLC Models
In the Iterative SDLC model stands out as a flexible and efficient methodology that promotes
continuous improvement and adaptability.
In this Model, you can start with some of the software specifications and develop the first version of
the software. After the first version if there is a need to change the software, then a new version of
the software is created with a new iteration. Every release of the Iterative Model finishes in an exact
and fixed period that is called iteration.
The Iterative Model allows the accessing earlier phases, in which the variations made
respectively. The final output of the project renewed at the end of the Software Development Life
Cycle (SDLC) process.
The various phases of Iterative model are as follows:
1. Requirement gathering & analysis: In this phase, requirements are gathered from
customers and check by an analyst whether requirements will fulfil or not. Analyst checks that need
will achieve within budget or not. After all of this, the software team skips to the next phase.
2. Design: In the design phase, team design the software by the different diagrams like
Data Flow diagram, activity diagram, class diagram, state transition diagram, etc.
3. Implementation: In the implementation, requirements are written in the coding
language and transformed into computer programmes which are called Software.
4. Testing: After completing the coding phase, software testing starts using different test
methods. There are many test methods, but the most common are white box, black box, and grey
box test methods.
5.Deployment: After completing all the phases, software is deployed to its work environment.
6. Review: In this phase, after the product deployment, review phase is performed to check
the behaviour and validity of the developed product. And if there are any error found then the
process starts again from the requirement gathering.
7. Maintenance: In the maintenance phase, after deployment of the software in the
working environment there may be some bugs, some errors or new updates are required.
Maintenance involves debugging and new addition options.
When to use the Iterative Model?
1. When requirements are defined clearly and easy to understand.
2. When the software application is large.
3. When there is a requirement of changes in future.
Advantages (Pros) of Iterative Model:
1. Testing and debugging during smaller iteration is easy.
2. A Parallel development can plan.
3. It is easily acceptable to ever-changing needs of the project.
4. Risks are identified and resolved during iteration.
5. Limited time spent on documentation and extra time on designing.
Disadvantage(Cons) of Iterative Model:
1. It is not suitable for smaller projects.
2. More Resources may be required.
3. Design can be changed again and again because of imperfect requirements.
4. Requirement changes can cause over budget.
5. Project completion date not confirmed because of changing requirements.
3. V-models (Verification and Validation Models)
The V-Models, also known as the Verification and Validation models, is an extension of the traditional
Waterfall models. It introduces a parallel testing phase for each corresponding development stage,
forming a V-shaped diagram.
Key Principles of V-Models:
● Parallel Development and Testing: Unlike the sequential nature of the Waterfall models, the
V-models promote parallel development and testing. Each development phase aligns with a
corresponding testing phase, fostering early defect detection.
● Verification and Validation: The V-models place equal emphasis on both verification
(ensuring that the product is built right) and validation (ensuring that the right product is
built). Verification activities align with development phases on the left side of the V,
while validation activities correspond to testing phases on the right side.
● Traceability: Traceability is a core tenet of the V-Models, ensuring a direct linkage
between each development phase and its associated testing phase. This traceability
facilitates comprehensive documentation and alignment between requirements, design,
and testing activities.
● Early Defect Detection: By integrating testing activities in parallel with development, the
V- models enable the early detection of defects. This proactive approach contributes to the
creation of a more robust and reliable end product.
Advantage (Pros) of V-Model:
1. Easy to Understand.
2. Testing Methods like planning, test designing happens well before coding.
3. This saves a lot of time. Hence a higher chance of success over the waterfall model.
4. Avoids the downward flow of the defects.
5. Works well for small plans where requirements are easily understood.
Disadvantage (Cons) of V-Model:
1. Very rigid and least flexible.
2. Not a good for a complex project.
3. Software is developed during the implementation stage, so no early prototypes of
the software are produced.
4. If any changes happen in the midway, then the test documents along with the
required documents, has to be updated.
When to use V-Model?
o When the requirement is well defined and not ambiguous.
o The V-shaped model should be used for small to medium-sized projects where
requirements are clearly defined and fixed.
o The V-shaped model should be chosen when sample technical resources are available with
essential technical expertise.
There are the various phases of Validation Phase of V-model:
1. Unit Testing: In the V-Model, Unit Test Plans (UTPs) are developed during the module
design phase. These UTPs are executed to eliminate errors at code level or unit level. A unit
is the
smallest entity which can independently exist, e.g., a program module. Unit testing verifies
that the smallest entity can function correctly when isolated from the rest of the codes/
units.
2. Integration Testing: Integration Test Plans are developed during the Architectural Design
Phase. These tests verify that groups created and tested independently can coexist and
communicate among themselves.
3. System Testing: System Tests Plans are developed during System Design Phase. Unlike Unit
and Integration Test Plans, System Tests Plans are composed by the client?s business
team. System Test ensures that expectations from an application developer are met.
4. Acceptance Testing: Acceptance testing is related to the business requirement analysis part.
It includes testing the software product in user atmosphere. Acceptance tests reveal the
compatibility problems with the different systems, which is available within the user
atmosphere. It conjointly discovers the non-functional problems like load and performance
defects within the real user atmosphere.
4. Spiral SDLC Models
The Spiral model combines the idea of iterative development with the systematic aspects of the
Waterfall model. It is based on the concept of a spiral, with each loop representing a phase in the
software development process. The model is inherently risk-driven, meaning that risks are
continuously assessed and addressed throughout the development life cycle.
Each cycle in the spiral is divided into four parts:
Objective setting: Each cycle in the spiral starts with the identification of purpose for that cycle, the
various alternatives that are possible for achieving the targets, and the constraints that exists.
Risk Assessment and reduction: The next phase in the cycle is to calculate these various alternatives
based on the goals and constraints. The focus of evaluation in this stage is located on the risk
perception for the project.
Development and validation: The next phase is to develop strategies that resolve uncertainties and
risks. This process may include activities such as benchmarking, simulation, and prototyping.
Planning: Finally, the next step is planned. The project is reviewed, and a choice made whether
to continue with a further period of the spiral. If it is determined to keep, plans are drawn up for
the next step of the project.
When to use Spiral Model?
o When deliverance is required to be frequent.
o When the project is large
o When requirements are unclear and complex
o When changes may require at any time
o Large and high budget projects
Advantages
o High amount of risk analysis
o Useful for large and mission-critical projects.
Disadvantages
o Can be a costly model to use.
o Risk analysis needed highly particular expertise
o Doesn't work well for smaller projects.
5. Agile SDLC Models
Agile is not a specific methodology but rather a set of principles and values outlined in the Agile
Manifesto. The Agile Manifesto prioritizes individuals and interactions, working solutions,
customer collaboration, and responding to change over rigid processes and documentation.
Several Agile methodologies, including Scrum, Kanban, and Extreme Programming (XP), have been
developed to implement these principles.
Advantages (Pros) of Agile Model:
1. Frequent Delivery
2. Face-to-Face Communication with clients.
3. Efficient design and fulfils the business requirement.
4. Anytime changes are acceptable.
5. It reduces total development time.
Disadvantages (Cons) of Agile Model:
1. Due to the shortage of formal documents, it creates confusion and crucial decisions taken
throughout various phases can be misinterpreted at any time by different team
members.
2. Due to the lack of proper documentation, once the project completes and the
developers allotted to another project, maintenance of the finished project can become
a difficulty.
Software Requirement Specification
Software Requirement Specification (SRS) Format as the name suggests, is a complete specification
and description of requirements of the software that need to be fulfilled for the successful
development of the software system. These requirements can be functional as well as non-functional
depending upon the type of requirement. The interaction between different customers and
contractors is done because it is necessary to fully understand the needs of customers.
Depending upon information gathered after interaction, SRS is developed which describes
requirements of software that may include changes and modifications that is needed to be done to
increase quality of product and to satisfy customer’s demand.
Introduction
● Purpose of this Document – At first, main aim of why this document is necessary and
what’s purpose of document is explained and described.
● Scope of this document – In this, overall working and main objective of document and
what value it will provide to customer is described and explained. It also includes a
description of development cost and time required.
● Overview – In this, description of product is explained. It’s simply summary or overall review
of product.
General description
In this, general functions of product which includes objective of user, a user characteristic, features,
benefits, about why its importance is mentioned. It also describes features of user community.
Functional Requirements
In this, possible outcome of software system which includes effects due to operation of program is
fully explained. All functional requirements which may include calculations, data processing, etc. are
placed in a ranked order. Functional requirements specify the expected behavior of the system-which
outputs should be produced from the given inputs. They describe the relationship between the input
and output of the system. For each functional requirement, detailed description all the data inputs
and their source, the units of measure, and the range of valid inputs must be specified.
Interface Requirements
In this, software interfaces which mean how software program communicates with each other or
users either in form of any language, code, or message are fully described and explained. Examples
can be shared memory, data streams, etc.
Performance Requirements
In this, how a software system performs desired functions under specific condition is explained. It
also explains required time, required memory, maximum error rate, etc. The performance
requirements part of an SRS specifies the performance constraints on the software system. All the
requirements relating to the performance characteristics of the system must be clearly specified.
There are two types of performance requirements: static and dynamic. Static requirements are those
that do not impose constraint on the execution characteristics of the system. Dynamic requirements
specify constraints on the execution behaviour of the system.
Design Constraints
In this, constraints which simply means limitation or restriction are specified and explained for design
team. Examples may include use of a particular algorithm, hardware and software limitations, etc.
There are a number of factors in the client’s environment that may restrict the choices of a designer
leading to design constraints such factors include standards that must be followed resource limits,
operating environment, reliability and security requirements and policies that may have an impact
on the design of the system. An SRS should identify and specify all such constraints.
Non-Functional Attributes
In this, non-functional attributes are explained that are required by software system for
better performance. An example may include Security, Portability, Reliability, Reusability,
Application compatibility, Data integrity, Scalability capacity, etc.
Preliminary Schedule and Budget
In this, initial version and budget of project plan are explained which include overall time duration
required and overall cost required for development of project.
Appendices
In this, additional information like references from where information is gathered, definitions of
some specific terms, acronyms, abbreviations, etc. are given and explained.
Uses of SRS document
● Development team require it for developing product according to the need.
● Test plans are generated by testing group based on the describe external behaviour.
● Maintenance and support staff need it to understand what the software product is
supposed to do.
● Project manager base their plans and estimates of schedule, effort and resources on it.
● customer rely on it to know that product they can expect.
● As a contract between developer and customer.
● in documentation purpose.
Verification
Verification is the process of checking that software achieves its goal without any bugs. It is the
process to ensure whether the product that is developed is right or not. It verifies whether the
developed product fulfills the requirements that we have. Verification is simply known as Static
Testing.
Static Testing
Verification Testing is known as Static Testing and it can be simply termed as checking whether we
are developing the right product or not and also whether our software is fulfilling the customer’s
requirement or not. Here are some of the activities that are involved in verification.
Validation
Validation is the process of checking whether the software product is up to the mark or in other
words product has high-level requirements. It is the process of checking the validation of the product
i.e. it checks what we are developing is the right product. it is a validation of actual and expected
products. Validation is simply known as Dynamic Testing.
Dynamic Testing
Validation Testing is known as Dynamic Testing in which we examine whether we have developed the
product right or not and also about the business needs of the client. Here are some of the activities
that are involved in Validation.
1. Black Box Testing
2. White Box Testing
3. Unit Testing
4. Integration Testing
What is Black Box Testing?
Black-box testing is a type of software testing in which the tester is not concerned with the
software’s internal knowledge or implementation details but rather focuses on validating the
functionality based on the provided specifications or requirements.
What is White Box Testing?
White box testing is a software testing technique that involves testing the internal structure and
workings of a software application . The tester has access to the source code and uses this
knowledge to design test cases that can verify the correctness of the software at the code level.