SOFTWARE ENGINEERING
SOFTWARE ENGINEERING
SOFTWARE ENGINEERING
(UNIT-1)
What is software?
A set of instructions, data or a program used to operate
computers and execute specific tasks
Software is a generic term used to refer the applications , scripts
and programs that run in a device
Operating Procedures:
Instructions to set-up and use, Reactions to system
failure, operating manuals.
Documentations:
Testing, Analysis, Design, Implementation
SOFTWARE
System Software:
System software is a collection of programs written to service other
programs.Example : Compilers, Operating Systems , etc
Software Crisis :
Software crisis is the failure of software development that leads to
incomplete and degrading performance of software products.
Causes:
1. Project Running over - budget
2. Project Running over - time
3. Not enough resources
2. Process model : This layer defines the overall process for developing
software. It includes the steps involved in the development process, the
roles and responsibilities of team members, and the tools and techniques
used to manage the process.
3. Methods : This layer refers to the specific techniques and practices used
to develop software. It includes software design patterns, coding
standards, and testing methodologies.
4. Tools : This layer includes the software tools and technologies used to
support the development process. It includes IDEs (Integrated
Development Environments), testing frameworks, version control systems,
and other software tools.
Software Myths:
Beliefs about software and the process used to build it. Myths have a
number of attributes that have made them dangerous.
Misleading Attitudes - caused serious problem for managers
and technical people.
Myth1: If we get behind schedule, we can add more programmers and catch up
Reality: Software development is not a mechanistic process like manufacturing.
Adding people to a late software project makes it Later.
Myth2: If I decide to outsource the software project to a third party, I can just
relax and let that firm build it.
Reality: If an organization does not understand how to manage and control
software projects internally, it will invariably struggle when it outsource
software projects
Myth4: Once we write the program and get it to work, our job is done.
Reality: Someone once said that "the sooner you begin 'writing code', the longer
it'll take you to get done." Industry data indicate that between 60 and 80
percent of all e ort expended on software will be expended after it is delivered
to the customer for the first time.
Myth5: Until I get the program "running" I have no way of assessing its quality.
Reality: One of the most e ective software quality assurance mechanisms can
be applied from the inception of a project—the formal technical review.
#Software process
A software process is a set of activities, methods, and practices that are used to
develop, test, deploy, and maintain software. It provides a structured approach
to software development that helps ensure that the resulting software is of high
quality, meets the needs of users and stakeholders, and is delivered on time and
within budget.
1. Communication:
● Heavy communication with customers, stakeholders, team
● Encompasses requirements gathering and related activities
2. Planning:
● Workflow that is to follow
● Describe technical task, likely risk, resources will require, work
products to be produced and a work schedule.
3. Modeling:
● Help developer and customer to understand requirements
(Analysis of requirements) & Design of software Construction
4. Code generation:
● either manual or automated or both
● Testing – to uncover error in the code.
5. Deployment:
● Delivery to the customer for evaluation
● Customer provide feedback
Umbrella Activities :
Umbrella activities are the high-level activities that are performed throughout
the software development process. They provide a framework for the entire
software development life cycle and help ensure that the development process
is comprehensive, consistent, and e ective.
● Process models are not perfect, but provide a roadmap for software
engineering work.
model may work for small projects but is totally unsatisfactory for products
of any reasonable size.
Maintenance is high.
1)Prototype Model
The prototype is evaluated by customer and feedback is given to refine the final
software
Problems :
● Customers can be lazy
● Prototype must be delivered quickly
2)Spiral Model
Barry Bohem recognized lack of “ Project risk” factor into a life cycle model
and tried to correct this using spiral model
4 PHASES OF SPIRAL MODEL :
● Planning : The aim of each cycle in the spiral,Each phase begins with the
gathering of requirements from the clients and the identification,
elaboration, and analysis of the objectives.
● Risk Analysis: All potential solutions are assessed in order to choose the
best one. The risks connected to that solution are then determined, and
the best method for addressing those risks is selected.
● Development: Product development and testing
● Assessment : Customer evaluation
Cycles :
1. Concept development projects
2. New product development projects
3. Product enhancement projects
4. Product maintenance project
#Software Metrics
-Lines Of Code(LOC)
#Cocomo Model
-------------------------------------------------------
-Basic Model
● Estimates very quickly and roughly
b
E = ab (KLOC) b
d
D = cb (E ort Applied) b
SS = E ort Applied /
Development Time
P = KLOC / E
—-----------------------------------------------------
-Intermediate Model
—------------------------------------------------------------
-Detailed Model
● Refined version of intermediate model
● Cost is calculated phase by phase :
1. Plan / requirements
2. Product design
3. Programming
4. Integration / Test
● It is not a flow chart.It contains arrows to represent flowing data, but any
order is not represented by them
DFD Rules :
● No process can have only outputs or only inputs,processes must
have both outputs and inputs.
● Process labels should be verb phrases.
● All flows to or from a data store must move through a process.
● Data store labels should be noun phrases.
● No data moves directly between external entities without going
through a process.
● Bidirectional flow between process and data store is represented by
two separate arrows.
● Data flow cannot go directly from a process to itself, must go
through Intervening processes.
DFD Levels :
Requirement
A function, constraint or other property that the system must provide to fill the
needs of the system’s intended user(s)
Requirement Engineering
means that requirements for a product are defined, managed and tested
systematically
RE establishes a solid base for design and construction. Without it, resulting
software has a high probability of not meeting customer needs.
Elicitation:
Requirement elicitation in software engineering is the process of gathering and
understanding what people want and need from a software system.
1. Identify who needs to be involved: Figure out who the important people
are that should be part of the process, like the users, customers, and
others who have a stake in the software.
2. Use di erent techniques to gather information: Talk to people through
interviews, surveys, and meetings to find out what they need. Also,
observe how they work and gather any existing documentation that can
help understand the requirements.
3. Write down the requirements clearly: Document the gathered
information in a way that is easy to understand. Use techniques like
describing user scenarios or writing specific user stories to capture the
requirements.
4. Check that the requirements make sense: Review the requirements with
the people involved to make sure they are accurate, complete, and
feasible. This may involve discussions, feedback sessions, and analyzing
the requirements for any potential problems.
5. Keep talking and working together: Requirement elicitation is not a
one-time thing. It requires ongoing communication and collaboration with
the people involved to clarify and refine the requirements as needed.
By following these steps, software developers can better understand what users
and stakeholders want, ensuring that the resulting software meets their
expectations and needs.
Why is Requirement elicitation di cult?
Elaboration:
● Focuses on developing a refined technical model of software
functions, features, and constraints using the information obtained
during inception and elicitation
● Create an analysis model that identifies data, function and
behavioral requirements.
● It is driven by the creation and refinement of user scenarios that
describe how the end-user will interact with the system.
● Each event parsed into extracted.
● End result defines informational, functional and behavioral domain
of the problem
Negotiation:
Agree on a deliverable system that is realistic for developers and
customers
➢ Requirements are categorized and organized into subsets
➢ Relations among requirements identified
➢ Requirements reviewed for correctness
➢ Requirements prioritized based on customer needs
➢ Negotiation about requirements, project cost and project timeline.
➢ There should be no winner and no loser in e ective negotiation.
Specification:
It can be –
★ Written Document
★ A set of graphical models
★ A formal mathematical models
★ Collection of usage scenarios
★ A prototype
★ Combination of above.
The Formality and format of a specification varies with the size and the
complexity of the software to be built.
Validation :
Requirement Management :
Set of activities that help project team to identify, control, and track
requirements and changes as project proceeds
Requirement Analysis:
Data Dictionary -
Imagine you want to build a treehouse. First, you have an idea of what you want it to
look like and what it should have, like a ladder, a slide, and a cozy space inside. That's
the "planning" stage. Then, you start drawing a detailed picture of your treehouse,
deciding where each part will go and how they will fit together. That's the "design"
stage.
So, in the software life cycle, the design part is like drawing a detailed picture of how
the software will be built. It's when we think about what the software should do, how
it should look, and how di erent parts will work together. Just like the treehouse
design helps us understand how everything will be put together, the software design
helps us plan and organize all the code and components needed to create the
software.
Once the design is finished, we can start building the software based on that plan. So,
the design phase comes after the planning phase and before the actual coding and
implementation of the software.
Software design is the first step in SDLC (Software Design Life Cycle), which moves the
concentration from problem domain to solution domain. It tries to specify how to fulfill
the requirements mentioned in SRS.
Software Design Levels Software design yields three levels of results:
● Detailed Design- Detailed design deals with the implementation part of what is
seen as a system and its sub-systems in the previous two designs. It is more
detailed towards modules and their implementations. It defines logical structure
of each module and their interfaces to communicate with other modules.
ABSTRACTION
MODULARITY
Advantage of modularization:
CONCURRENCY
When a software program is modularized, its tasks are divided into several modules
based on some characteristics. As we know, modules are set of instructions put
together in order to achieve some tasks. They are though, considered as single entity
but may refer to each other to work together. There are measures by which the quality
of a design of modules and their interaction among them can be measured. These
measures are called coupling and cohesion.
COHESION
Cohesion in software design refers to how closely related and focused the
responsibilities of a module or component are. It measures how well a module or
component performs a single, well-defined task. The greater the cohesion, the better is
the program design.
5. Temporal Cohesion: The module performs tasks that are executed at the same
time or within the same timeframe, such as a module that handles event
scheduling.
6. Logical Cohesion: The module performs tasks that are logically related but do
not fit into the above categories, such as a module that handles error logging
and reporting.
7. Coincidental Cohesion: The module performs unrelated tasks that do not have a
common purpose, indicating a poor design where responsibilities are not
well-defined or organized.
In this context, the term "strongest" refers to the highest degree of cohesion, indicating
that the module performs a single, well-defined function or has a highly focused
purpose. Conversely, the term "weakest" refers to the lowest degree of cohesion,
indicating that the module performs unrelated tasks or lacks a clear and specific
purpose.
COUPLING
Coupling in software design refers to the degree of interdependence or interaction
between software modules or components. It measures how closely connected or
reliant one module is on another.
The five levels of coupling, from weakest to strongest, are:
1. Content Coupling: Modules directly access and modify each other's data,
indicating a strong interdependency.
2. Common Coupling: Modules share a global data area, which can lead to
unintended side e ects and reduced maintainability.
3. Control Coupling: One module controls the execution of another module by
passing control information or flags.
4. Stamp Coupling: Modules share a data structure, but they have no direct
coupling beyond that shared structure.
5. Data Coupling: Modules communicate by passing data through parameters or
arguments, promoting loose coupling and better modularization.
DETAILED DESIGN
The detailed design phase in software engineering is where the high-level concepts and
requirements of a software system are transformed into a detailed blueprint for
implementation. It involves breaking down the system into smaller components,
specifying their structure, behavior, and interaction.
During this phase, designers create detailed design documents that provide
instructions for developers on how to build each component. These documents outline
the data structures, algorithms, interfaces, and other technical details required for
implementation.
1. Component Design
2. Interface Design
3. Database Design
4. Algorithm Design
5. User Interface Design
The goal of the detailed design phase is to provide developers with clear and precise
instructions, ensuring that the software system is implemented accurately and
e ciently.
—---------------------------------------------------------------------------------------------------------
REFACTORING OF DESIGNS
Imagine you have a piece of code that works correctly, but it's messy and hard to read.
Refactoring involves rewriting parts of the code to make it cleaner, more e cient, and
easier to work with. This could involve renaming variables or functions to have more
meaningful names, splitting large chunks of code into smaller, reusable parts, or
simplifying complex logic to make it easier to follow.
The purpose of refactoring is to make the code easier to work with, reducing the
chances of introducing bugs and making it more flexible for future changes. It's like
tidying up your room to make it more organized and inviting.
1. Improves code readability and maintainability.
2. Enhances code e ciency and performance.
3. Increases code reusability and modularity.
4. Reduces the risk of introducing bugs during software development.
1. Classes and Objects: Objects are instances of classes, which are blueprint
templates that define the properties (data) and behaviors (methods) of the
objects. For example, if we have a class called "Car", an object of that class could
be a specific car with its own unique characteristics.
These aspects work together to create interfaces that are visually engaging, easy to
navigate, and provide a seamless and enjoyable user experience.
SOFTWARE TESTING
White Box Testing: White box testing is performed with knowledge of the internal
structure, code, and implementation of the software. Testers use this information to
design test cases that exercise di erent paths and conditions within the code. The aim
is to ensure that all statements, branches, and logical paths are tested thoroughly.
White box testing techniques include statement coverage, branch coverage, and path
coverage.
● Example: Suppose you have a function that calculates the average of a list of
numbers. In white box testing, you would examine the code and design test
cases to cover di erent scenarios such as an empty list, a list with only one
number, and a list with multiple numbers. You would also ensure that the code
handles edge cases correctly, such as handling negative numbers or handling
large lists.
Black Box Testing: Black box testing is performed without any knowledge of the
internal structure or code of the software. Testers focus solely on the external behavior
and functionality of the software. Test cases are designed based on the specified
requirements, input/output specifications, and user expectations. The aim is to validate
that the software functions correctly from the user's perspective.
● Example: Suppose you have a login feature in a web application. In black box
testing, you would design test cases to cover various scenarios such as valid
login credentials, invalid login credentials, empty fields, and special characters in
the input fields. You would test the behavior of the application without knowing
how the authentication process is implemented internally.
p Stress TESTING
SOFTWARE
Stress testing is a type of software testing that evaluates the performance and stability
of a system under extreme or peak loads. It aims to identify the breaking point or
limitations of the system and how it handles high-stress conditions.
In stress testing, the software is subjected to heavy workloads, high tra c, or data
volume to assess its response and behavior. The goal is to understand how the system
handles these stressful situations and to ensure it can handle them without crashing or
experiencing performance degradation.
ALPHA TESTING
During alpha testing, real-world scenarios are simulated to identify any bugs, usability
issues, or design flaws. Feedback from the alpha testers helps developers make
improvements and fine-tune the software before the o cial release.
For example, a software company may invite a small group of users to test a new
mobile app. These testers will use the app in di erent scenarios, report any issues they
encounter, and provide feedback on the app's features and usability. The developers
will then make necessary changes based on this feedback to enhance the app's
performance and user experience.
BETA TESTING
Beta testing is a type of software testing conducted by a larger group of external users
before the final release of the software. It allows developers to gather feedback from a
diverse user base and uncover any remaining issues or bugs.
During beta testing, the software is made available to a wider audience who use it in
real-world scenarios. The testers provide feedback on their experience, report any
problems they encounter, and suggest improvements. This feedback helps the
developers identify and address any remaining issues, enhance the software's usability,
and ensure its stability.
For example, a software company may release a beta version of a new video editing
software to a group of volunteer testers. These testers will use the software, explore its
features, and provide feedback on any issues or suggestions for improvement. The
developers will then analyze this feedback and make necessary changes before the
final release of the software to the general public.
ACCEPTANCE TESTING
DEBUGGING
Debugging occurs as a consequence of successful testing. That is, when a test case
uncovers an error, debugging is the process that results in the removal of the error.
Debugging is not testing but often occurs as a consequence of testing. The debugging
process attempts to match symptom with cause, thereby leading to error correction.
● Brute force debugging is a common but ine cient method used when other
approaches fail.
● Backtracking involves tracing the source code backward from the identified
symptom to find the cause, but it becomes challenging as the program size
increases.
● Before correcting a bug, consider if the bug pattern exists elsewhere, potential
new bugs that may be introduced, and preventive measures for future bugs.
UNIT 4
SOFTWARE MAINTENANCE
Software Maintenance is the process of modifying a software product after it has been
delivered to the customer. The main purpose of software maintenance is to modify and
update software application after delivery to correct faults and to improve
performance.
● Correct faults.
● Improve the design.
● Implement enhancements.
● Interface with other systems.
● Accommodate programs so that di erent hardware, software, system features,
and telecommunications facilities can be used.
● Migrate legacy software.
● Retire software.
Version control is about keeping track of di erent versions of software files and
managing changes made by multiple developers. It ensures that everyone is working
on the correct and latest version of the code.
RE-ENGINEERING
When we need to update the software to keep it to the current market, without
impacting its functionality, it is called software re-engineering. It is a thorough process
where the design of software is changed and programs are re-written.
Re-Engineering Process
Just like how a detective investigates a crime scene to understand how it happened,
reverse engineering involves studying the software's components, interactions, and
logic to comprehend how it works. This can be done by analyzing the compiled code,
disassembling binaries, or examining system artifacts.
Reverse engineering is often used when the original source code or documentation is
not available or when there is a need to understand and modify existing software
systems. It helps in uncovering hidden knowledge, identifying vulnerabilities, or reusing
existing components for further development or improvement.
FORWARD ENGINEERING
Forward engineering is the process of creating new software systems from scratch,
starting with requirements analysis and design, and proceeding with implementation
and testing. It involves moving forward in the software development life cycle, building
the system step by step.
● The resources required for a particular process Resources might include total
e ort in person-days, travel costs or computer resources.
—---------------------------------------------------------------------------------------------------------
METRICS FOR SOFTWARE QUALITY
● Software quality metrics are objective measurements used to assess the quality
of a software product or process.
● They provide quantitative information on aspects like reliability, maintainability,
e ciency, usability, and security.
● Examples of metrics include defect density, code coverage, customer
satisfaction index, and mean time to repair.
● Metrics help identify areas for improvement, track progress, and ensure software
meets quality standards.
● Measurement techniques include static analysis, dynamic analysis, code reviews,
testing, and user surveys.
● Metrics should be interpreted in the context of the specific project and
stakeholder requirements.
● They enable data-driven decision making and continuous improvement of
software quality.
RISK MANAGEMENT
The three types of risks in software engineering:
1. Project Risks: These risks are associated with the management and execution of
the software development project. They include factors such as inaccurate
project estimation, insu cient resources, unrealistic deadlines, and ine ective
communication among team members. Project risks can lead to delays, cost
overruns, and failure to meet project goals.
2. Technical Risks: Technical risks are related to the software development process
itself. They involve challenges or uncertainties associated with technology,
design, implementation, and integration. Examples of technical risks include
compatibility issues, software complexity, scalability limitations, security
vulnerabilities, and performance bottlenecks. Technical risks can result in system
failures, poor quality software, or the inability to deliver desired functionality.
3. Business Risks: Business risks are concerned with the impact of software
development on the overall business objectives and success. They involve factors
such as market competition, changing customer needs, financial constraints,
and legal or regulatory compliance. Business risks may include failure to achieve
desired market share, loss of revenue, negative impact on brand reputation, or
legal repercussions.
Risk identification: Risk identification is the process of identifying potential risks and
uncertainties that could a ect the success of a project. It involves carefully examining
various aspects of the project, including the project scope, requirements, available
resources, and external factors. The goal is to identify any factors that could pose a
threat to the project's objectives.
For example, in a software development project, the risk of inadequate user
involvement during the requirements gathering phase could lead to misunderstandings
and project delays. By identifying this risk early on, appropriate measures can be taken
to address it.
Risk projection: Once risks are identified, they need to be assessed in terms of their
potential impact and likelihood of occurrence. This step helps in prioritizing risks and
determining the level of attention and resources required for their management. Risk
projection involves analyzing each identified risk and projecting its potential
consequences on the project.
For instance, if there is a risk related to software compatibility issues, the project team
may project the potential impact on the project's timeline and budget. This information
enables them to allocate resources and plan for mitigation strategies accordingly.
Risk refinement: Risk refinement involves further analyzing and evaluating identified
risks to gain a deeper understanding of their severity, probability, and potential
consequences. It involves assessing the risks in more detail, gathering additional
information, and refining the risk assessment. This helps in focusing on the most critical
risks and developing specific strategies for risk mitigation.
For example, if the risk is identified as inadequate testing resources, the team can
further refine this risk by identifying specific constraints and potential solutions, such
as outsourcing testing tasks or acquiring additional resources.
—---------------------------------------------------------------------------------------------------------
RMMM
Once the mitigation strategies are in place, the next step is risk monitoring. This
involves actively tracking and observing the identified risks to ensure that the
implemented mitigation strategies are e ective and that new risks are promptly
identified. Regular monitoring helps in identifying any changes in the risk landscape
and allows for timely adjustments in mitigation approaches. For instance, if the risk of
software compatibility issues persists despite mitigation e orts, the project team may
need to reassess the strategies and consider alternative solutions.
RELIABILITY
Reliability in software refers to the ability of a software system to perform its intended
functions without failure or errors, under specified conditions, for a defined period of
time. It is a crucial aspect of software quality and ensures that the software behaves
consistently and predictably.
Six commonly used reliability metrics to quantify the reliability of software products:
1. Failure Rate: The failure rate is a measure of the frequency at which failures or
errors occur in the software system over a specified period of time. It is typically
expressed as the number of failures per unit of time, such as failures per hour or
failures per month.
2. Mean Time Between Failures (MTBF): MTBF represents the average time
interval between consecutive failures in the software system. It provides an
indication of the system's reliability by measuring the average time it operates
without experiencing a failure. MTBF is calculated by dividing the total operating
time by the number of failures.
4. Mean Time to Repair (MTTR): MTTR is the average time taken to repair or
restore the software system after a failure occurs. It includes the time required
for diagnosing the problem, implementing a fix, and bringing the system back to
a fully functional state. A lower MTTR indicates quicker recovery and better
reliability.
5. Mean Time to Failure (MTTF): MTTF represents the average time between the
start of operation of the software system and the occurrence of its first failure. It
is a measure of the system's reliability during its normal operating conditions.
6. Mean Residual Life (MRL): MRL measures the average remaining useful life of
the software system after a failure has occurred. It indicates the reliability of the
system after experiencing a failure and provides insights into the system's ability
to continue functioning without further failures.
QUALITY MANAGEMENT
ISO 9000 : ISO 9000 is a set of international standards developed by the International
Organization for Standardization (ISO) for quality management systems. It provides
guidelines and criteria for organizations to establish, implement, maintain, and improve
their quality processes. The ISO 9000 standards focus on customer satisfaction, process
e ciency, and continuous improvement. Compliance with ISO 9000 demonstrates an
organization's commitment to delivering consistent and high-quality products or
services. The standards cover various aspects, including management responsibility,
resource management, product realization, and measurement, analysis, and
improvement. By adopting ISO 9000, organizations can establish a systematic
approach to quality management and enhance customer confidence in their products
or services.
Six Sigma : Six Sigma is a data-driven approach for process improvement that aims to
reduce defects and variations in products or services. It is based on the concept of
achieving a defect rate of 3.4 per million opportunities.
By using data and statistical tools, organizations can identify process ine ciencies,
optimize performance, and enhance customer satisfaction. For example, in a
manufacturing setting, Six Sigma can be used to minimize product defects and
improve production e ciency by analyzing process data and implementing process
modifications. The goal of Six Sigma is to drive continuous improvement, reduce waste,
and enhance overall organizational performance.