Object-Oriented Implementation & Testing
Object-Oriented Implementation & Testing
Outline of topics
Object Oriented Implementation, Testing and
Maintenance.
OO Implementation
Testing Philosophies
The full-lifecycle object oriented testing (FLOOT)
methodology
Quality Assurance
Test Driven Development
Transition/Deployment issues
OO Software Maintenance ( Evolution)
Documentation
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
3
1. Introduction
Pragmatics, what is it? Why is it important ?
Software development today is a multibillion-dollar,
competitive, worldwide business, stretching from North
America through Western and Eastern Europe and into Asia
and the Pacific Rim.
In spite of the tools available to support the major
functions in object-oriented development—(requirements
management, configuration management, design, code,
and test)—there are still too many failures. (Booch)
Schedules are missed.
Costs are overrun.
Functionality is not provided.
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
4
Introduction Cont’d…
Pragmatics, what is it ? Why is it important?
Tens to hundreds of millions of dollars are lost on single
development efforts.
An unfortunate example is the FBI’s Virtual Case File system, which was intended to
be an important tool in fighting terrorism.
After more than three years in development, in April 2005 “the bureau had to scrap
the US $170 million project, including $105 million worth of unusable code”.
On March 16, 2006, the FBI awarded a $305 million contract to develop the
Sentinel system to replace the Virtual Case File system.
This is but one example of far too many failed software developments .
Pragmatics is concerned with how the system design process we have done so far
would be linked to the reality or how it would give sense or meaning to the
stakeholders.
These issues will cover Coding, testing along with documentation and object
oriented benefit realization.
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
5
Introduction Cont’d…
Remember that ;
Object-oriented analysis, design and
programming are related but distinct.
OOA is concerned with developing an object model of the
application domain.
OOD is concerned with developing an object-oriented
system model to implement requirements.
OOP is concerned with realising an OOD using an OO
programming language such as Java, C# or C++.
programming
Always write high-quality, clean code:
Quality work is one of the practices of extreme programming (XP).
High-quality code is easier to write, easier to understand, and easier to
enhance.
Refactor ruthlessly:
Make small changes to your code to improve its design without adding new
functionality.
Refactoring includes, renaming a method, splitting a method in two,
moving a method up a class hierarchy etc.
Think before you code:
Conduct test or model driven development.
Develop in small steps:
Writing a few lines of code, testing it, and then writing a few more lines—is
often far more effective than writing a whole bunch of code all at once.
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
Philosophies for effective 9
programming Cont’d…
Write understandable code:
Program for people, not just only you
Adopt and follow coding standards and guidelines:
Add Internal documentation to improve code readability:
Comments /*-------*/
Write the documentation before you write the code:
Write code documents before or as you code it.
Follow the 30-second rule:
Look at a method, a class, or an interface definition and be able to fully understand
what it does, why it does it, and how it does it in less than 30 seconds
A method can be made understandable in less than 30 seconds by effective heading
documentation, adherence to common naming and programming conventions, and
effective internal documentation.
Smaller methods are usually better:
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
Object Oriented Programming 10
Languages
Palo Alto Research Center (PARC)
developed Smalltalk in the early 1970’s
Smalltalk is considered the first truly object-
oriented Language
Led other languages to support object-
oriented programming
examples: Objective-C, C++, Self, Eiffel, and
Flavors
1980 Booch pioneered the concept of
object-oriented design (OOD)
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
Object Oriented Programming Language 11
Evolution
Languages
Object-oriented programming is a method of implementation in which
programs are organized as cooperative collections of objects, each of
which represents an instance of some class, and whose classes are
all members of a hierarchy of classes united via inheritance
relationships.
Languages
Java
C#
Python
Ruby
PHP
R
…too many to list them all here.
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
14
3. OO Implementation (Programming)
Association
Aggregation
Composition
Inheritance
Take Teach
5..60 0..3 1
Student * Course Teacher
Faculty
class Address {
...
}
11/16/2025 } Chapter 6 Object Oriented Implementation, Testing and Maintenance
20
Inheritance
Weak Inheritance
A weak is-an-extension-of relationship can be
represented using interfaces. For example, the
weak is-an-extension-of relationship “students are
comparable based on their grades” can be represented
by implementing the Comparable interface, as follows:
public class Student extends Person
implements Comparable {
Person /** Data fields, Constructors, and */
Student /** Methods */
Comparable
/** Implement the compareTo method */
public int compareTo(Object object) {
// ...
}
}
(A) (B)
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
Multiple Inheritance- Not supported 22
by most languages.
cont’d…
Cont’d…
For example, since an orange is a fruit, their relationship should be
modeled using class inheritance.
A weak “is-an-extension-of” relationship, also known as an is-kind-of
relationship, indicates that an object possesses a certain property.
A weak is-an-extension-of relationship can be modeled using
interfaces.
For example,
All strings are comparable, so the String class implements the Comparable
interface.
A circle or a rectangle is a geometric object, for example, so Circle can be designed
as a subclass of GeometricObject.
Circles are different and comparable based on their radius, for example, so Circle
can implement the Comparable interface.
Cont’d…
Testing(FLOOT)
curve
Quality Assurance
Schulmeyer and McManus define software quality as “the fitness
for use of the total software product” .
Software quality doesn’t just happen: It must be engineered into the
system.
Quality assurance (QA) is the act of reviewing and auditing the
project deliverables and activities to verify that they comply
with the applicable standards, guidelines, and processes
adopted by your organization.
Fundamentally, quality assurance attempts to answer the following
questions:
“Are you building the right thing?” and
“Are you building it the right way?”
Which question is important? and why?
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
34
requirements conformance
performance
an indication
of quality
Software Testing
white- black-
box box
method
s method
s
Methods
Strategies
White-Box Testing
Black-Box Testing
requirements
output
input events
Black-Box Testing
Test Plan
Test Plans
A test plan is a document that contains a complete set of
test cases for a system
Along with other information about the testing process.
The test plan is one of the standard forms of documentation.
If a project does not have a test plan:
Testing will inevitably be done in an ad-hoc manner.
Leading to poor quality software.
The test plan should be written long before the testing starts.
You can start to develop the test plan once you have developed the
requirements.
Testing Tools
Many Agile Developers use
xUnit family of open source tools, such as;
JUnit ([Link] and
VBUnit ([Link] to test their code.
The advantage of these tools is that they implement a testing
framework with which you can regression test all of your source code.
Commercial testing tools, such as
Mercury Interactive ([Link]
jTest ([Link] and
Rational Suite Test Studio ([Link] are also viable options.
One or more testing tools must be in your development
toolkit;
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
Object-Oriented Testing 48
Techniques
Until just recently, object-oriented testing has been a
“little understood” topic.
When testing systems built using object technology
it is important to understand that your source code is
composed of several constructs, including
methods (operations),
classes, and
inheritance relationships.
Therefore you need testing techniques that reflect
the fact that you have these constructs.
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
Object-Oriented Testing 49
Techniques
Method testing. Method testing is the act of ensuring that
your methods, called operations or member functions in C++
and Java, perform as defined.
Class testing. This is both unit testing and traditional
integration testing.
Class-integration testing. Also known as component
testing, this technique addresses the issue of whether the
classes in your system, or a component of your system, work
together properly.
Inheritance-regression testing. This is the running of the
class and method test cases for all the super classes of
the class being tested.
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
50
Code Inspections
testing
The first pass of unit and integration testing is called
Developer testing.
Preliminary testing performed by the software developers
who do the design.
Refactoring
6. Transition Issues
Remember Transition is one of the main phases in RUP.
The work products produced during the Transition phase
include
the packaged product,
any supporting documentation,
training materials, and
marketing materials.
The Transition phase is successfully completed when the
functionality and quality of the releases are sufficient to
make the product available to end users (the system has
passed acceptance testing)
This phase mainly focuses on deploying the application to its
production environment along with all it support materials
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
Transition Issues- Documentations 59
Cont’d…
Installation/Deployment
Putting the system into the production environment.
Direct(Cut over)- aka “Big Bang” associated with the waterfall model.
Phased – a portion of the old application is replaced with the new one. Aka Rolling Deployment
Parallel: A fail-safe process. In this method, two identical production environments work in
parallel. AKA Blue-Green, Red-Black or A/B Deployment
One Site(single location): the new application is installed in only a subset of the deployment
infrastructure . AKA Canary Deployment
Training Materials
Enabling end users and technical personals to work and mange the system/software
For whom and how much is an important questions?
Operations Material
Backup procedures, Batch job and printing requirements, Data extraction/sharing requirements,
Installation procedures, Resource requirements, Release notes
Support Material
Contact points within development and operations , Escalation procedures, Support call
recording process, User documentation (all versions), List of new features
( Evolution)
Once a software system has been delivered (post-transition),
changes to the deployed system will most likely be needed.
Planned or not, systems tend to evolve over time, a
condition that is often incorrectly labeled software
maintenance
Changes may be made to provide new or improved features
(evolution) or to fix discovered defects (maintenance), or
at times to keep an old system functional(preservation).
The issue of maintaining an operational system without
breaking what is already there is a real concern
( Evolution)
Software change is inevitable
New requirements emerge when the software is used;
The business environment changes;
Errors must be repaired;
New computers and equipment is added to the system;
The performance or reliability of the system may have to
be improved.
A key problem for all organizations is
implementing and managing change to
their existing software systems.
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
Maintenance, Evolution and 64
Preservation
To be more precise,
it is maintenance when we correct errors;
it is evolution when we respond to changing
requirements;
it is preservation when we continue to use extraordinary
means to keep an ancient and decaying piece of software
in operation.
Reality suggests that an excessive percentage of
software development resources are spent on
software preservation
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
65
OO Software Maintenance
Maintenance
Providing continuous support as long as the
software/system is alive.
Types of Maintenance
Adaptive
Perfective
Corrective
Preventive
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
A state machine for a software 66
system ?
( Evolution)
Some maintenance releases involve
simple localized changes and no architectural innovation (i.e., they include mainly a
Transition phase),
Others require some thinking with regard to scope and
business value, as well as architecture and risk
i.e., they include both
Inception and
Elaboration phases.
Such maintenance releases are considered more major, and their lifecycles look
something more like the complete end-to-end process.
In an evolutionary development( iterative and incremental), the line
between systems development and maintenance is blurred.
This is because;
Continuous Integration ??
Continuous Delivery??
8. Documentation
The main goal of effective documentation is to
ensure that developers and stakeholders are
headed in the same direction to accomplish the
objectives of the project.
To achieve them, plenty of documentation types
exist.
All software documentation can be divided
into two main categories:
Product documentation
Process documentation
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
Project Documentation: Types/ Classification
71
Documentation types
Two Types:
Product documentation describes the product that is being
developed and provides instructions on how to perform various
tasks with it.
System documentation represents documents that describe the system itself and
its parts. It includes requirements documents, design decisions, architecture
descriptions, program source code…etc.
User documentation covers manuals that are mainly prepared for end-users of the
product and system administrators. User documentation includes tutorials, user
guides, troubleshooting manuals, installation, and reference manuals.
Process documentation represents all documents produced during
development and maintenance that describe… well, the process.
The common examples of process-related documents are standards, project
documentation, such as project plans, test schedules, reports, meeting notes, or even
business correspondence(e-mail, letters etc.).
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
72
System Documentation
End of Chapter 6
Course Summary
Introduction
Understanding motivations and basic concepts
Terminologies , concepts, processes, approaches
Modeling using UML
Understanding modeling tools in software development
Types, categories and structure
Requirement elicitation
Collecting and organizing users requirement- WHAT- User
needs
From function, class, and interface points of view
11/16/2025 Chapter 6 Object Oriented Implementation, Testing and Maintenance
75