You are on page 1of 7

Domasi College of Education

Unit 1

Definition and
Characteristics of Object-
Oriented Programming

Introduction
In Computer Programming I, you were introduced to
computer programming using a procedural
programming language such as C. In this unit, you will
be introduced to object-oriented programming using
Java. You will find the ideas in this unit more useful in
Software Development.
You are supposed to install Java and make sure to use
the right Integrated Development Environment (IDE).
You can use NetBeans as an IDE for Java
Programming Language. Now, let us get started.

Computer Programming II, Object-Oriented 1-1


Domasi College of Education

Success Criteria
By the end of this Unit, you should be able to:
 define Object-Oriented Programming
 list examples of Object-Oriented Programming
languages
 explain the characteristics of Object-Oriented
Programming
 state the advantages of Object-Oriented
Programming over Procedural Programming

Key Words
You will find the following key words or phrases in this
unit: OOP, Inheritance, Polymorphism, Abstraction
and Encapsulation. Watch for these and make sure
that you understand what they mean and how they are
used in the unit.

Object-Oriented Programming (OOP)


Definition 1.1
Object-Oriented Programming is a paradigm or
methodology that focuses on designing a program
using classes and objects.
You may wish to note that a paradigm is a way in
which a computer language looks at the problem to be
solved.
There are several examples of Object-Oriented
Programming languages and that include Java,
Python, C#, C++, Ruby and many more.

Definition 1.2
On the other hand, Lewis (n. d), defines Object-
Oriented Programming (OOP) as a “computer
programming model that organizes software design
around data, or objects, rather than functions and
logic” (para. 1).
In both definitions, you will notice that OOP is about
the usage of objects.

Computer Programming II, Object-Oriented 1-2


Domasi College of Education

Characteristics of Object-Oriented Programming


Language
a. Polymorphism
Polymorphism is defined as the ability of an object to
respond differently to the same message or the ability
of an object to take more than one form.
b. Encapsulation/Information Hiding
It is the wrapping of data and functions together as a
single unit.
c. Data Abstraction
It is the act of representing essential features without
including the back ground details or explanation.
d. Inheritance
It is defined as the process where one class acquires
the properties, methods and fields of another. The
class which inherits the properties of other is known
as subclass or derived class or child class. The class
whose properties are inherited is known as superclass
or base class or parent class.

Advantages of Object-Oriented Programming over


Procedural Programming
You may take note that the following are advantages of
OOP over procedural programming as outlined by
W3Schools (n. d):
 OOP is faster and easier to execute
 OOP provides a clear structure for the programs
 OOP helps to keep the Java code DRY "Don't
Repeat Yourself", and makes the code easier to
maintain, modify and debug
 OOP makes it possible to create full reusable
applications with less code and shorter
development time

Now that you have learned the characteristics of OOP,


in Unit 3, you will learn more about Java inheritance.

Computer Programming II, Object-Oriented 1-3


Domasi College of Education

Self-Evaluation Activity 1
1. What does OOP stand for?
2. Define inheritance as used in OOP.
3. List any three Object-Oriented Programming
languages.

Answers to this activity are at the end of this unit.

Summary
In this unit, you have looked at the definition and
characteristics of Object-Oriented Programming the
following:
 Object-Oriented Programming is a paradigm or
methodology that focuses on designing a
program using classes and objects.
 Characteristics of Object-Oriented Programming
include inheritance, polymorphism, abstraction
and encapsulation.
 OOP has many advantages over Procedural
Programming.

In the next unit, you will be introduced to classes,


objects and class diagrams.

Reflection
Which concept(s) have you find more challenging in
this unit and why? Do you need extra help in that
concept(s)?

Computer Programming II, Object-Oriented 1-4


Domasi College of Education

Unit 1 Test
1. What is Object-Oriented Programming?
2. State four characteristics of Object-Oriented
Programming (OOP).
3. Suggest any two advantages of Object-Oriented
Programming over Procedural Programming

You will find the answers to the Unit Test at the end of
the unit.

Computer Programming II, Object-Oriented 1-5


Domasi College of Education

Answers to Activity 1
1. Object-Oriented Programming
2. Inheritance is defined as the process where one class
acquires the properties, methods and fields of
another.
3. Java, Python, C++, Ruby, C# (any three).

Computer Programming II, Object-Oriented 1-6


Domasi College of Education

Answers to Unit Test


1. Object-Oriented Programming is a paradigm or
methodology that focuses on designing a program using
classes and objects.
2. Polymorphism: ability of an object to respond differently to
the same message or the ability of an object to take more
than one form
Encapsulation/Information Hiding: the wrapping of data
and functions together as a single unit.
Data Abstraction: the act of representing essential features
without including the back ground details or explanation.
Inheritance: the process where one class acquires the
properties, methods and fields of another.
3. a. OOP is faster and easier to execute
b. OOP provides a clear structure for the programs
c. OOP makes the code easier to maintain, modify and
debug
d. OOP makes it possible to create full reusable
applications with less code and shorter development
time
(Any two)

Computer Programming II, Object-Oriented 1-7

You might also like