04 Software Engineering
04 Software Engineering
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.
Software engineering includes a variety of techniques, tools, and methodologies, including
requirements analysis, design, testing, and maintenance.
Software engineering is a fully layered technology, to develop software we need to go from one
layer to another.
No feedback path
Difficult to accommodate change requests
No overlapping of phases
Incremental Model
The incremental process model is also known as
the Successive version model.
Advantages-
Disadvantages-
Risk Handling
Good for large projects
Customer Satisfaction
Complex
Expensive
Too much dependability on Risk Analysis
Difficulty in time management
Agile Model The Agile model was primarily designed to help a
project adapt to change requests quickly.
Agility is achieved by fitting the process to the
project and removing activities that may not be
essential for a specific project.
Actually Agile model refers to a group of
development processes.
Small projects
Projects involving new technology or
Research projects
Rapid application development model (RAD)
Advantages:
The use of reusable components helps to reduce the
cycle time of the project.
Feedback from the customer is available at the
initial stages.
Reduced costs as fewer developers are required.
This model should be used for a system with known
requirements and requiring a short development
time.
Disadvantages:
The use of powerful and efficient tools requires
highly skilled professionals.
The absence of reusable components can lead to the
failure of the project.
The systems which cannot be modularized suitably
cannot use this model.
Customer involvement is required throughout the
life cycle.
It is not meant for small-scale projects.
Evolutionary Model
Advantages:
In evolutionary model, a user gets a chance to experiment
partially developed system.
It reduces the error because the core modules get tested
thoroughly.
Disadvantages:
Sometimes it is hard to divide the problem into several
versions that would be acceptable to the customer which can
be incrementally implemented and delivered.
Prototype Model
Prototyping is defined as the process of developing a
working replication of a product or system that has to be
engineered.
Advantages –
New requirements can be easily accommodated as there is
scope for refinement.
Missing functionalities can be easily figured out.
Errors can be detected much earlier thereby saving a lot of
effort and cost, besides enhancing the quality of the
software.
Flexibility in design.
Disadvantages –
Costly w.r.t time as well as money.
It is very difficult for developers to accommodate all the
changes demanded by the customer.
There is uncertainty in determining the number of
iterations that would be required before the prototype is
finally accepted by the customer.
The V-model is a type of SDLC model where process
V - Model executes in a sequential manner in V-shape.
It is also known as Verification and Validation model.
It is based on the association of a testing phase for
each corresponding development stage.
Development of each step directly associated with the
testing phase.
Advantages:
V-Model is used for small projects where project
requirements are clear.
Simple and easy to understand and use.
It enables project management to track progress
accurately.
Disadvantages:
High risk and uncertainty.
It is not a good for complex and object-oriented
projects.
It is not suitable for projects where requirements are
not clear and contains high risk of changing.
This model does not support iteration of phases.
It does not easily handle concurrent events.
Verification Vs Validation
Verification Validation
It includes checking documents, design, codes and
It includes testing and validating the actual product.
programs.
It does not include the execution of the code. It includes the execution of the code.
Methods used in verification are reviews, Methods used in validation are Black Box Testing, White
walkthroughs, inspections and desk-checking. Box Testing and non-functional testing.
It checks whether the software conforms to It checks whether the software meets the requirements and
specifications or not. expectations of a customer or not.
Verification means Are we building the product right? Validation means Are we building the right product?
Requirements Engineering Process
1.Unambiguous: The SRS should be clear and specific, and should avoid using
vague or imprecise language.
1.Traceable: The SRS should be traceable to other documents and artifacts, such as
use cases and user stories, to ensure that all requirements are being met.
1.Verifiable: The SRS should be verifiable, which means that the requirements can
be tested and validated to ensure that they are being met.
1.Modifiable: The SRS should be modifiable, so that it can be updated and changed
as the software development process progresses.
1.Testable: The SRS should be written in a way that allows the requirements to be
tested and validated.
Abstraction
Modularity Refactoring
Refinement Pattern
Cohesion
Cohesion refers to the degree to which elements within a module work together to fulfill a
single, well-defined purpose.
A good software design will have high cohesion.
Types of cohesion
Functional Cohesion: Every essential element for a single computation is contained in the
component.
Sequential Cohesion: An element outputs some data that becomes the input for other
element.
Communicational Cohesion: Two elements operate on the same input data or contribute
towards the same output data.
Procedural Cohesion: Elements of procedural cohesion ensure the order of execution.
Temporal Cohesion: A module connected with temporal cohesion all the tasks must be
executed in the same time span.
Logical Cohesion: The elements are logically related and not functionally.
Coincidental Cohesion: The elements are not related(unrelated). The elements have no
conceptual relationship other than location in source code.
Coupling
Coupling is the measure of the degree of interdependence between the modules.
A good software will have low coupling.
Types of coupling
Data Coupling: If the dependency between the modules is based on the fact that they
communicate by passing only data, then the modules are said to be data coupled. Module
communications don’t contain tramp data.
Stamp Coupling: In stamp coupling, the complete data structure is passed from one module
to another module. Therefore, it involves tramp data.
Control Coupling: If the modules communicate by passing control information, then they
are said to be control coupled.
External Coupling: In external coupling, the modules depend on other modules, external to
the software being developed or to a particular type of hardware.
Common Coupling: The modules have shared data such as global data structures.
Content Coupling: In a content coupling, one module can modify the data of another
module, or control flow is passed from one module to the other module.
Capability maturity model (CMM)
It is not a software process model. It is a framework that is used to analyze the approach and
techniques followed by any organization to develop software products.
Each level of maturity shows a process capability level. All the levels except level-1 are further
described by Key Process Areas (KPA’s).
Types of Maintenance
Perfective maintenance
Preventive software maintenance addresses the usability and
refers to software changes that are functionality of the software and
carried out to future-proof a product in involves changing the existing
advance. product functionality by deleting,
refining, and adding new features.
Software Testing
Testing is the process of executing a program to find errors.
To make software perform well it should be error-free.
Principles of Testing:-
1. Verification:
It refers to the set of tasks that ensure that the software correctly implements a specific function.
2. Validation:
It refers to a different set of tasks that ensure that the software that has been built is traceable to
customer requirements.
Equivalence partitioning
In this, input data divided into partitions of valid and invalid values, and it is mandatory that all
partitions must exhibit the same behavior.
Acceptance testing
It is formal testing based on user requirements and function processing.
It determines whether the software is conforming specified requirements and user requirements or
not.
Alpha Testing
to determine the product in the development testing environment by a specialized testers team
usually called alpha testers.
Beta Testing:
to assess the product by exposing it to the real end-users, usually called beta testers in their
environment.
Feedback is collected from the users and the defects are fixed.
Also, this helps in enhancing the product to give a rich user experience.
This type of testing method is often used by developers to test their own code and own
implementation as the design, code and the implementation is better known to the developers.
This testing method is implemented with the intention to test the logic of the code so that the user
requirements can be fulfilled.
It is a method that is used to find the test paths of a program according to the locations of definitions
and uses of variables in the program. It has nothing to do with data flow diagrams.
It is concerned with:
• Statements where variables receive values,
• Statements where these values are used or referenced.
Basis Path Testing
It is a technique of selecting the paths in the control flow graph, that provide a basis set of execution
paths through the program or module.
To design test cases using this technique, four steps are followed :
• Construct the Control Flow Graph
• Compute the Cyclomatic Complexity of the Graph
• Identify the Independent Paths
• Design Test cases from Independent Paths
Statement Coverage
This technique involves execution of all statements of the source code at least once.
It is used to calculate the total number of executed statements in the source code out of total statements
present in the source code.
Branch coverage
Path Coverage
It is a structured testing technique for designing test cases with intention to examine all possible paths of
execution at least once.
Creating and executing tests for all possible paths results in 100% statement coverage and 100%
branch coverage.
Example of Statement, Branch and Path coverage :
Path : We can cover all the paths in the flowchart by writing 4 Test
Cases that follow the following four routes: 1A-2B-E-4F, 1A-2B-E-4G-
5H, 1A-2C-3D-E-4G-5H and 1A-2C-3D-E-4F.
Cyclomatic Complexity
It is a software metric that measures the logical complexity of the program code.
It is the maximum number of independent paths through the program code.
It depends only on the number of decisions in the program code.
Insertion or deletion of functional statements from the code does not affect its cyclomatic complexity.
It is always greater than or equal to 1.
There are 3 commonly used methods for calculating the cyclomatic complexity-
Cyclomatic Complexity = Total number of closed regions in the control flow graph + 1
Cyclomatic Complexity = E – N + 2
Here, E = Total number of edges in the control flow graph, N = Total number of nodes in
the control flow graph
Cyclomatic Complexity = P + 1
Here, P = Total number of predicate nodes contained in the control flow graph
McCall’s Quality Factors
Quality Factors Definitions
Correctness The extent to which a program satisfies its specifications and fulfills the user's
mission objectives.
Reliability The extent to which a program can be expected to perform its intended function with
required precision.
Efficiency The amount of computing resources and code required by a program to perform a
function.
Integrity The extent to which access to software or data by unauthorized persons can be
controlled.
Usability The effort required to learn, operate, prepare input, and interpret output of a
program.
Maintainability The effort required to locate and fix a defect in an operational program.
Testability The effort required to test a program to ensure that it performs its intended functions.
Flexibility The effort required to modify an operational program.
Portability The effort required to transfer a program from one hardware
and/ or software environment to another.
Reusability The extent to which parts of a software system can be reused in other applications.
Interoperability The effort required to couple one system with another.
Quality Assurance Vs Quality Control
Quality Assurance (QA) Quality Control (QC)
It focuses on providing assurance that the quality
It focuses on fulfilling the quality requested.
requested will be achieved.
It does not include the execution of the program. It always includes the execution of the program.
Clean room software engineering is a software development approach to producing quality software.
External Output 4 5 7
External Enquiry 3 4 6
External Interface 5 7 10