St.
Joseph’s Degree College, Sunkesula Road, Kurnool II BSc (Computer Science) IV Semester
Object Oriented Software Engineering
UNIT-III
Software Construction and Testing: Software construction basics, Object-oriented design principles, Object-
oriented programming languages (Java, C++, Python), Software testing basics (unit testing, integration testing,
system testing), Test-driven development (TDD)
Software construction basics:
Software construction is a software engineering discipline. It is the detailed creation of working
meaningful software through a combination of coding, verification, unit testing, integration testing,
and debugging. It is linked to all the other software engineering disciplines, most strongly to software
design and software testing.
1. Minimizing complexity: The need to reduce complexity is mainly driven by limited ability of most
people to hold complex structures and information in their working memories. Reduced complexity is
achieved through emphasizing the creation of code that is simple and readable rather than clever.
Minimizing complexity is accomplished through making use of standards, and through numerous
specific techniques in coding.
2. Anticipating change: Anticipating change helps software engineers build extensible software, which
means they can enhance a software product without disrupting the underlying structure. Research over
25 years showed that the cost of rework can be 10 to 100 times (5 to 10 times for smaller projects)
more expensive than getting the requirements right the first time. Given that 25% of the requirements
change during development on average project, the need to reduce the cost of rework elucidates the
need for anticipating change.
3. Constructing for verification: Constructing for verification means building software in such a way
that faults can be ferreted out readily by the software engineers writing the software, as well as during
independent testing and operational activities. Specific techniques that support constructing
for verification include following coding standards to support code reviews, unit testing,
organizing code to support automated testing, and restricted use of complex or hard-to-
understand language structures, among others.
4. Reuse: Systematic reuse can enable significant software productivity, quality, and cost improvements.
Reuse has two closely related facets:
a. Construction for reuse: Create reusable software assets.
b. Construction with reuse: Reuse software assets in the construction of a new solution.
5. Standards in construction: Standards, whether external (created by international organizations) or internal
(created at the corporate level), that directly affect construction issues include:
• Communication methods: Such as standards for document formats and contents.
• Programming languages
• Coding standards
• Platforms
• Tools: Such as diagrammatic standards for notations like UML.
Department of Computer Science 1
St. Joseph’s Degree College, Sunkesula Road, Kurnool II BSc (Computer Science) IV Semester
Object-oriented design principles
The SOLID principles are five essential guidelines that enhance software design, making code more
maintainable and scalable.
These five principles are:
1. Single Responsibility Principle (SRP)
2. Open/Closed Principle
3. Liskov’s Substitution Principle (LSP)
4. Interface Segregation Principle (ISP)
5. Dependency Inversion Principle (DIP)
The SOLID principle helps in reducing tight coupling. Tight coupling means a group of classes are highly
dependent on one another which you should avoid in your code.
• Opposite of tight coupling is loose coupling and your code is considered as a good code when it has
loosely-coupled classes.
• Loosely coupled classes minimize changes in your code, helps in making code more reusable,
maintainable, flexible and stable.
1.Single Responsibility Principle
This principle states that “A class should have only one reason to change” which means every class should
have a single responsibility or single job or single purpose. In other words, a class should have only one job
or purpose within the software system.
Let’s understand Single Responsibility Principle using an example:
Imagine a baker who is responsible for baking bread. The baker’s role is to focus on the task of baking bread,
ensuring that the bread is of high quality, properly baked, and meets the bakery’s standards.
2. Open/Closed Principle
This principle states that “Software entities (classes, modules, functions, etc.) should be open for
extension, but closed for modification” which means you should be able to extend a class behavior, without
modifying it.
Let’s understand Open/Closed Principle using an example:
Imagine you have a class called PaymentProcessor that processes payments for an online store. Initially, the
PaymentProcessor class only supports processing payments using credit cards. However, you want to extend
its functionality to also support processing payments using PayPal.
3. Liskov’s Substitution Principle
The principle was introduced by Barbara Liskov in 1987 and according to this principle “Derived or child
classes must be substitutable for their base or parent classes“. This principle ensures that any class that is
the child of a parent class should be usable in place of its parent without any unexpected behavior.
Let’s understand Liskov’s Substitution Principle using an example:
One of the classic examples of this principle is a rectangle having four sides. A rectangle’s height can be any
value and width can be any value. A square is a rectangle with equal width and height. So we can say that we
can extend the properties of the rectangle class into square class.
Department of Computer Science 2
St. Joseph’s Degree College, Sunkesula Road, Kurnool II BSc (Computer Science) IV Semester
4. Interface Segregation Principle
This principle is the first principle that applies to Interfaces instead of classes in SOLID and it is similar to the
single responsibility principle. It states that “do not force any client to implement an interface which is
irrelevant to them“. Here your main goal is to focus on avoiding fat interface and give preference to many
small client-specific interfaces. You should prefer many client interfaces rather than one general interface and
each interface should have a specific responsibility.
Let’s understand Interface Segregation Principle using an example:
Suppose if you enter a restaurant and you are pure vegetarian. The waiter in that restaurant gave you the
menu card which includes vegetarian items, non-vegetarian items, drinks, and sweets.
5. Dependency Inversion Principle
The Dependency Inversion Principle (DIP) is a principle in object-oriented design that states that “High-level
modules should not depend on low-level modules. Both should depend on abstractions“. Additionally,
abstractions should not depend on details. Details should depend on abstractions.
• In simpler terms, the DIP suggests that classes should rely on abstractions (e.g., interfaces or abstract
classes) rather than concrete implementations.
• This allows for more flexible and decoupled code, making it easier to change implementations
without affecting other parts of the codebase.
Let’s understand Dependency Inversion Principle using an example:
In a software development team, developers depend on an abstract version control system (e.g., Git) to
manage and track changes to the codebase. They don’t depend on specific details of how Git works
internally.
Object-oriented programming languages (Java, C++, Python)
What is Object-Oriented Programming Language?
The Object-oriented Programming Language is the one where the code revolves around the concept
of objects. These objects are smaller parts of the code. In simple terms, a complex program is broken into
smaller parts, say objects, and executed. Various functions and operations are performed on the objects. Thus,
the object is the data with unique attributes and behavior.
The blueprint of an object is called a Class. It is a prototype defining the variables and the methods. Further,
there are four basic Object-Oriented Programming Concepts that one must know.
They are:
• Abstraction (the internal details are hidden and only the necessary details are available to the user).
• Inheritance ( Inheriting the properties of a superclass by a subclass ).
• Encapsulation ( wrapping of the data and methods into a single unit ).
• Polymorphism ( a function or an object taking multiple forms ).
Java, Python, and C++ are a few examples of Object-oriented programming languages.
Department of Computer Science 3
St. Joseph’s Degree College, Sunkesula Road, Kurnool II BSc (Computer Science) IV Semester
Why Object-Oriented Programming Language?
Here are reasons why object-oriented programming language is preferred,
• It reduces the complexity of the program by breaking it into objects and classes.
• The development of programs is relatively faster with the help of its various features. Rich
libraries are one of the features that enable faster development.
• The software is also easy to maintain and has simple updating processes.
• The three main highlighting factors include Modularity, Extensibility, and Reusability.
1.Python
Python Programming Language, which supports various programming paradigms is regarded as one of
the advanced languages in programming. It is a high-level programming language most commonly used
by programmers. It is used in building applications, automation, analysis of data, etc.
Python is easy to learn. The syntax is simple and indentations play a key role. Python has got a lot of built-
in packages, libraries, and plugins that help programmers in the development or analysis process.
The libraries also enable Python for machine learning, web processing, etc. Data processing, visualizing,
etc. are possible through data-focused libraries such as pandas, NumPy, Matplotlib, etc. Python as an
object-oriented programming language supports various OOPs concepts such as inheritance, encapsulation,
etc.
2. Java
Java Programming Language is class and object-based. Java is the most commonly used programming
language in developing web applications. All of the OOPs concepts like encapsulation, abstraction,
inheritance, and polymorphism form the basics of Java programming language.
Java is high-level, platform-independent, free, easy to learn, secure, and fast. The code is structured and
could be reused. Java supports concurrency through concepts like multithreading and multitasking.
The Java ecosystem includes Java Development Kit (JDK), Java Runtime Environment (JRE), and Java
Virtual Machine (JVM). Java is a language almost similar to C++ and C even though it shares common
syntax and comment styles.
3. C++
C++ is a programming language that supports object-oriented programming paradigms giving a clear structure
to the code. C++ is an advanced version of C. Java is said to be influenced by C++.
Browsers, software applications, operating systems, data structures, etc. can be developed using C++. It
provides different types of memory management. A distinguishing factor in C++ is its support
for destructors. It also supports lambda expressions (anonymous functions).
C++ also works for other types of programming paradigms such as procedural, functional, etc. Hence it is
powerful and flexible. Eclipse, Visual Studio Code, and Dev-C++ are the most commonly used Development
Platforms for C++ programs.
Department of Computer Science 4
St. Joseph’s Degree College, Sunkesula Road, Kurnool II BSc (Computer Science) IV Semester
Software Testing Basics:
What is Software Testing?
Software testing is an important process in the software development lifecycle. It
involves verifying and validating that a software application is free of bugs, meets the technical
requirements set by its design and development, and satisfies user requirements efficiently and effectively.
Software Testing is a method to assess the functionality of the software program. The process checks whether
the actual software matches the expected requirements and ensures the software is bug-free. The purpose of
software testing is to identify the errors, faults, or missing requirements in contrast to actual requirements. It
mainly aims at measuring the specification, functionality, and performance of a software program or
application.
Software Testing Can be Divided into Two Steps
1. Verification: It refers to the set of tasks that ensure that the software correctly implements a specific
function. It means “Are we building the product right?”.
2. Validation: It refers to a different set of tasks that ensure that the software that has been built is
traceable to customer requirements. It means “Are we building the right product?”.
Different Types of Software Testing
Explore diverse software testing methods including manual and automated testing for improved quality
assurance. Enhance software reliability and performance through functional and non-functional testing,
ensuring user satisfaction.
Department of Computer Science 5
St. Joseph’s Degree College, Sunkesula Road, Kurnool II BSc (Computer Science) IV Semester
Software Testing can be broadly classified into 3 types:
1. Functional Testing: It is a type of software testing that validates the software systems against the
functional requirements. It is performed to check whether the application is working as per the
software’s functional requirements or not. Various types of functional testing are Unit testing,
Integration testing, System testing, Smoke testing, and so on.
2. Non-Functional Testing: It is a type of software testing that checks the application for non-
functional requirements like performance, scalability, portability, stress, etc. Various types of non-
functional testing are Performance testing, Stress testing, Usability Testing, and so on.
3. Maintenance Testing: It is the process of changing, modifying, and updating the software to keep
up with the customer’s needs. It involves regression testing that verifies that recent changes to the
code have not adversely affected other previously working parts of the software.
Apart from the above classification software testing can be further divided into 2 more
ways of testing:
1. Manual Testing: It includes testing software manually, i.e., without using any automation tool or
script. In this type, the tester takes over the role of an end-user and tests the software to identify any
unexpected behaviour or bug. There are different stages for manual testing such as unit testing,
integration testing, system testing, and user acceptance testing. Testers use test plans, test cases, or test
scenarios to test software to ensure the completeness of testing. Manual testing also includes
exploratory testing, as testers explore the software to identify errors in it.
2. Automation Testing: It is also known as Test Automation, is when the tester writes scripts and
uses another software to test the product. This process involves the automation of a manual process.
Automation Testing is used to re-run the test scenarios quickly and repeatedly, that were performed
manually in manual testing.
Apart from Regression testing, Automation testing is also used to test the application from a load,
performance, and stress point of view. It increases the test coverage, improves accuracy, and saves time and
money when compared to manual testing.
Different Types of Software Testing Techniques
1. Black box Testing: Testing in which the tester doesn’t have access to the source code of the software
and is conducted at the software interface without any concern with the internal logical structure of the
software known as black-box testing.
2. White box Testing: Testing in which the tester is aware of the internal workings of the product,
has access to its source code, and is conducted by making sure that all internal operations are
performed according to the specifications is known as white box testing.
3. Grey Box Testing: Testing in which the testers should have knowledge of implementation;
however, they need not be experts.
Department of Computer Science 6
St. Joseph’s Degree College, Sunkesula Road, Kurnool II BSc (Computer Science) IV Semester
Black Box Testing White Box Testing
Internal workings of an Knowledge of the internal
application are not required. workings is a must.
Also known as closed box/data- Also known as clear
driven testing. box/structural testing.
End users, testers, and Normally done by testers and
developers. developers.
This can only be done by a trial Data domains and internal
and error method. boundaries can be better tested.
Different Levels of Software Testing
Software level testing can be majorly classified into 4 levels:
1. Unit Testing: It a level of the software testing process where individual units/components of a
software/system are tested. The purpose is to validate that each unit of the software performs as
designed.
2. Integration Testing: It is a level of the software testing process where individual units are combined
and tested as a group. The purpose of this level of testing is to expose faults in the interaction between
integrated units.
3. System Testing: It is a level of the software testing process where a complete, integrated
system/software is tested. The purpose of this test is to evaluate the system’s compliance with the
specified requirements.
4. Acceptance Testing: It is a level of the software testing process where a system is tested for
acceptability. The purpose of this test is to evaluate the system’s compliance with the business
requirements and assess whether it is acceptable for delivery.
Benefits of Software Testing
• Product Quality: Testing ensures the delivery of a high-quality product as the errors are discovered
and fixed early in the development cycle.
• Customer Satisfaction: Software testing aims to detect the errors or vulnerabilities in the software
early in the development phase so that the detected bugs can be fixed before the delivery of the product.
Usability testing is a type of software testing that checks the application for how easily usable it is for
the users to use the application.
• Cost-Effective: Testing any project on time helps to save money and time for the long term. If the
bugs are caught in the early phases of software testing, it costs less to fix those errors.
• Security: Security testing is a type of software testing that is focused on testing the application for
security vulnerabilities from internal or external sources.
Department of Computer Science 7
St. Joseph’s Degree College, Sunkesula Road, Kurnool II BSc (Computer Science) IV Semester
I. Unit Testing – Software Testing
Unit testing is the process of testing the smallest parts of your code, like individual functions or methods, to
make sure they work correctly. It’s a key part of software development that improves code quality by testing
each unit in isolation.
You write unit tests for these code units and run them automatically every time you make changes. If a test
fails, it helps you quickly find and fix the issue. Unit testing promotes modular code, ensures better test
coverage, and saves time by allowing developers to focus more on coding than manual testing.
Unit testing strategies
To create effective unit tests, follow these basic techniques to ensure all scenarios are covered:
• Logic checks: Verify if the system performs correct calculations and follows the expected path with
valid inputs. Check all possible paths through the code are tested.
• Boundary checks: Test how the system handles typical, edge case, and invalid inputs. For example,
if an integer between 3 and 7 is expected, check how the system reacts to a 5 (normal), a 3 (edge
case), and a 9 (invalid input).
• Error handling: Check the system properly handles errors. Does it prompt for a new input, or does
it crash when something goes wrong?
• Object-oriented checks: If the code modifies objects, confirm that the object’s state is correctly
updated after running the code.
Types of Unit Testing
There are two types of Unit testing methods
1. Manual Testing
2. Automation Testing
Department of Computer Science 8
St. Joseph’s Degree College, Sunkesula Road, Kurnool II BSc (Computer Science) IV Semester
1. Manual unit testing
Manual testing is like checking each part of a project by hand, without using any special tools. People, like
developers, do each step of the testing themselves. But manual unit testing isn’t used much because there are
better ways to do it and it has some problems:
• It costs more because workers have to be paid for the time they spend testing, especially if they’re not
permanent staff.
• It takes a lot of time because tests have to be done every time the code changes.
• It is hard to find and fix problems because it is tricky to test each part separately.
• Developers often do manual testing themselves to see if their code works correctly.
2. Automated Unit Testing
Automated unit testing verifies software functionality with minimal human effort using specialized tools. It
works as follows:
• Test Code: Developers write small test scripts to check individual functions.
• Pre-Release Removal: These tests are used only during development.
• Isolation Testing: Ensures each component works independently.
• Automation Tools: Frameworks detect failures automatically.
• Efficiency: Tests are fast, lightweight, and run without external dependencies.
Automated unit testing acts as a continuous quality check, ensuring software reliability throughout
development.
Unit Testing Techniques
There are 3 types of Unit Testing Techniques. They are follows
1. Black Box Testing: This testing technique is used in covering the unit tests for input, user interface,
and output parts.
2. White Box Testing: This technique is used in testing the functional behavior of the system by giving
the input and checking the functionality output including the internal design structure and code of the
modules.
3. Gray Box Testing: This technique is used in executing the relevant test cases, test methods, and test
functions, and analyzing the code performance for the modules.
II. Integration Testing
Integration testing is a software testing technique that focuses on verifying the interactions and data exchange
between different components or modules of a software application.
The goal of integration testing is to identify any problems or bugs that arise when different components are
combined and interact with each other.
Integration testing is typically performed after unit testing and before system testing. It helps to identify and
resolve integration issues early in the development cycle, reducing the risk of more severe and costly problems
later on.
Department of Computer Science 9
St. Joseph’s Degree College, Sunkesula Road, Kurnool II BSc (Computer Science) IV Semester
Integration test approaches
There are four types of integration testing approaches. Those approaches are the following:
1. Big-Bang Integration Testing
• It is the simplest integration testing approach, where all the modules are combined and the functionality
is verified after the completion of individual module testing.
• In simple words, all the modules of the system are simply put together and tested.
• This approach is typically used when the software components have a low degree of
interdependence or when there are constraints in the development environment that prevent testing
individual components.
• The goal of big-bang integration testing is to verify the overall functionality of the system and to
identify any integration problems that arise when the components are combined.
2. Bottom-Up Integration Testing
• In bottom-up testing, each module at lower levels is tested with higher modules until all modules
are tested.
• The primary purpose of this integration testing is that each subsystem tests the interfaces among
various modules making up the subsystem. This integration testing uses test drivers to drive and pass
appropriate data to the lower-level modules.
3. Top-Down Integration Testing
• Top-down integration testing technique is used in order to simulate the behaviour of the lower-
level modules that are not yet integrated.
• In this integration testing, testing takes place from top to bottom. First, high-level modules are
tested and then low-level modules and finally integrating the low-level modules to a high level to
ensure the system is working as intended.
4. Mixed Integration Testing
• A mixed integration testing is also called sandwiched integration testing. A mixed integration
testing follows a combination of top down and bottom-up testing approaches.
• In top-down approach, testing can start only after the top-level module have been coded and unit
tested.
• In bottom-up approach, testing can start only after the bottom level modules are ready. This
sandwich or mixed approach overcomes this shortcoming of the top-down and bottom-up
approaches.
• It is also called the hybrid integration testing. also, stubs and drivers are used in mixed integration
testing.
Difference between Manual Testing and Automated Testing
Parameters Manual Testing Automation Testing
In manual testing, the test cases In automated testing, the test
Definition are executed by the human cases are executed by the
tester. software tools.
Manual testing is time- Automation testing is faster
Processing Time
consuming. than manual testing.
Department of Computer Science 10
St. Joseph’s Degree College, Sunkesula Road, Kurnool II BSc (Computer Science) IV Semester
Parameters Manual Testing Automation Testing
Automation testing takes up
Manual testing takes up human
Resources requirement automation tools and trained
resources.
employees.
Exploratory testing is possible Exploratory testing is not
Exploratory testing
in manual testing. possible in automation testing.
Automation testing uses
Manual testing doesn’t use
Framework requirement frameworks like Data Drive,
frameworks.
Keyword, etc.
Manual testing is not reliable Automated testing is more
Reliability due to the possibility of manual reliable due to the use of
errors. automated tools and scripts.
In automated testing,
In manual testing, investment is
Investment investment is required for tools
required for human resources.
and automated engineers.
In automated testing, the test
In manual testing, the test
results are readily available to
results are recorded in an excel
Test results availability all the stakeholders in the
sheet so they are not readily
dashboard of the automated
available.
tool.
Unit Testing vs Integration Testing
S.
No. Unit Testing Integration Testing
In unit testing, each module of the software In integration testing, all modules of the software are
1.
is tested separately. tested combined.
In unit testing tester knows the internal Integration testing doesn’t know the internal design
2.
design of the software. of the software.
Unit testing is performed first of all testing Integration testing is performed after unit testing and
3.
processes. before system testing.
Department of Computer Science 11
St. Joseph’s Degree College, Sunkesula Road, Kurnool II BSc (Computer Science) IV Semester
S.
No. Unit Testing Integration Testing
4. Unit testing is white box testing. Integration testing is black box testing.
5. Unit testing is performed by the developer. Integration testing is performed by the tester.
III. System Testing
System testing is a black-box testing technique performed on a fully integrated software system to ensure it
meets the specified requirements. It is conducted after integration testing and before acceptance testing,
verifying that all components work together as expected.
This phase evaluates both functional (e.g., feature validation, workflows) and non-functional aspects (e.g.,
performance, security, usability). Since system testing focuses on the system as a whole, it helps detect issues
that may not be visible in unit or integration testing.
System testing is performed by an independent testing team to ensure unbiased quality assessment. The
process includes test planning, test case design, execution, defect reporting, and retesting. Various testing
types fall under system testing, such as functional testing (e.g., regression, smoke, end-to-end) and non-
functional testing (e.g., performance, security, usability). By simulating real-world conditions, system testing
ensures the software behaves correctly under different scenarios.
The key benefits of system testing include early defect detection, improved software reliability, and
enhanced performance before deployment. It ensures the system meets user expectations and functions
beyond the specifications outlined in the Software Requirements Specification (SRS). Ultimately, system
testing plays a crucial role in delivering high-quality software that is stable, efficient, and ready for real-world
use.
Department of Computer Science 12
St. Joseph’s Degree College, Sunkesula Road, Kurnool II BSc (Computer Science) IV Semester
Types of System Testing
• Performance Testing: Performance Testing is a type of software testing that is carried out to test the
speed, scalability, stability and reliability of the software product or application.
• Load Testing: Load Testing is a type of software Testing which is carried out to determine the
behaviour of a system or software product under extreme load.
• Stress Testing: Stress Testing is a type of software testing performed to check the robustness of the
system under the varying loads.
• Scalability Testing: Scalability Testing is a type of software testing which is carried out to check the
performance of a software application or system in terms of its capability to scale up or scale down the
number of user request load.
Test Driven Development (TDD)
Test-driven development (TDD) is a method of coding in which you first write a test and it fails, then write
the code to pass the test of development, and clean up the code. This process recycled for one new feature or
change. In other methods in which you write either all the code or all the tests first, TDD will combine and
write tests and code together into one.
Test-Driven Development (TDD) is a method in software development where the focus is on writing tests
before writing the actual code for a feature. This approach uses short development cycles that repeat to ensure
quality and correctness.
Process of Test Driven Development (TDD)
It is the process in which test cases are written before the code that validates those cases. It depends on the
repetition of a concise development cycle. Test-driven Development is a technique in which automated Unit
tests are used to drive the design and free decoupling of dependencies.
The following sequence of steps is generally followed:
• Run all the test cases and make sure that the new test case fails.
• Red – Create a test case and make it fail, Run the test cases
• Green – Make the test case pass by any means.
• Refactor – Change the code to remove duplicate/redundancy.Refactor code – This is done to remove
duplication of code.
• Repeat the above-mentioned steps again and again
Department of Computer Science 13
St. Joseph’s Degree College, Sunkesula Road, Kurnool II BSc (Computer Science) IV Semester
Advantages of Test Driven Development (TDD)
• Unit test provides constant feedback about the functions.
• Quality of design increases which further helps in proper maintenance.
• Test driven development act as a safety net against the bugs.
• TDD ensures that your application actually meets requirements defined for it.
• TDD have very short development lifecycle.
Disadvantages of Test Driven Development (TDD)
• Increased Code Volume: Using TDD means writing extra code for tests cases , which can make the
overall codebase larger and more Unstructured.
• False Security from Tests: Passing tests will make the developers think the code is safer only for
assuming purpose.
• Maintenance Overheads: Keeping a lot of tests up-to-date can be difficult to maintain the information
and its also time-consuming process.
• Time-Consuming Test Processes: Writing and maintaining the tests can take a long time.
• Testing Environment Set-Up: TDD needs to be a proper testing environment in which it will make
effort to set up and maintain the codes and data.
Department of Computer Science 14
Software maintenance is the process of modifying, updating, and improving software
after it has been deployed to ensure it continues to function correctly, efficiently, and
securely. It is a crucial phase of the software development life cycle (SDLC) and helps
extend the software’s lifespan.
Types of Software Maintenance
1. Corrective Maintenance – Fixes bugs, errors, or defects found in the software
after release.
2. Adaptive Maintenance – Modifies software to work with new hardware, operating
systems, or external changes.
3. Perfective Maintenance – Enhances software performance, user experience, or
functionality based on user feedback.
4. Preventive Maintenance – Refactors and optimizes code to prevent future issues
and improve maintainability.
Importance of Software Maintenance
• Ensures security by patching vulnerabilities.
• Improves performance and efficiency.
• Enhances user experience by adding new features.
• Keeps the software compatible with evolving technologies.
Functionalities of Software Maintenance (Simple Explanation)
1. Fixing Bugs – Corrects errors and problems in the software.
2. Updating Software – Adapts the software to new operating systems or hardware.
3. Improving Performance – Makes the software faster and more efficient.
4. Preventing Issues – Reduces future problems by optimizing code.
5. Enhancing Security – Fixes vulnerabilities to protect against cyber threats.
6. Adding Features – Introduces new functions based on user needs.
7. Backing Up Data – Ensures data is safe and can be recovered.
8. Maintaining Database – Keeps data organized and improves retrieval speed.
Causes of Software Maintenance Problems
1. Poor Code Quality – Messy and unorganized code is hard to update.
2. Lack of Documentation – Without proper notes, understanding the
system is difficult.
3. Tightly Connected Components – Changing one part can break others.
4. Frequent Requirement Changes – Constant updates make maintenance
harder.
5. Outdated Technology – Old software tools and frameworks cause issues.
6. Lack of Testing – Bugs increase when there aren’t enough tests.
7. Different Coding Styles – Inconsistent code makes updates confusing.
9. Key Developers Leaving – Losing experienced developers affects system
understanding.
10. Poor Initial Design – A weak foundation makes future changes complex.
11. Security Issues – Regular updates are needed to fix vulnerabilities.
Advantages of Test-Driven Development (TDD)
Fewer Bugs – Catches errors early.
Better Code Quality – Encourages clean, modular code.
Easier Maintenance – Code is well-structured and testable.
Faster Debugging – Easier to find and fix issues.
Improved Confidence – Safe to modify code without breaking things.
Disadvantages of Test-Driven Development (TDD)
Takes More Time Initially – Writing tests before code slows early development.
Not Suitable for All Projects – Hard to apply for UI-heavy or complex systems.
Requires Skilled Developers – Teams need to understand TDD well.
Over-Reliance on Tests – Good tests don’t always mean perfect software.
Slows Prototyping – Not ideal for quick experimental development.