Lecture - 1
Lecture - 1
(OOP)
Using C++
Lecture #1
1 Edrak Uiversity
C++ OOPs Concept
2 Edrak Uiversity
Cont…
3 Edrak Uiversity
OOPs (Object Oriented Programming System)
4 Edrak Uiversity
Cont…
• Object
• Class
• Inheritance
• Polymorphism
• Abstraction
• Encapsulation
5 Edrak Uiversity
Object & Class
Object
Any entity that has state and behavior is known
as an object.
For example: chair, pen, table, keyboard, bike etc.
It can be physical and logical.
Class
Collection of objects is called class.
It is a logical entity.
4
6 Edrak Uiversity
Cont…
7 Edrak Uiversity
C++ OOPs Concept
Inheritance
When one object acquires all
the properties and behaviors
of parent object known as
inheritance.
It provides code reusability
when a class includes
property of another class.
8 Edrak Uiversity
C++ OOPs Concept
Polymorphism
Polymorphism is a feature using which an
object behaves differently in different situation.
9 Edrak Uiversity
Cont…
10 Edrak Uiversity
Cont…
Polymorphism
real example:
a person at the
same time can
have different
characteristics.
11 Edrak Uiversity
C++ OOPs Concepts
Abstraction
Hiding internal details and
showing functionality is
known as abstraction.
For example: phone call,
we don't know the internal
processing.
In C++, we use abstract
class and interface to
achieve abstraction.
12 Edrak Uiversity
C++ OOPs Concepts
Encapsulation
Binding (or wrapping) code and data together
into a single unit is known as encapsulation.
Encapsulation is a process of combining data
members and functions in a single unit called
class.
For example: capsule, it is wrapped with
different medicines.
13 Edrak Uiversity
Cont…
14 Edrak Uiversity
Advantage of OOPs over Procedure-Oriented
Programming Language
16 Edrak Uiversity
Thanks
17 Edrak Uiversity