Features of
Object Oriented
Programming
OOP in JAVA
TEAM AIMER’S PRESENTED TO:
Content
BASICS OF OOP
4 PILLARS OF OOP
INHERITANCE
ENCAPSULATION
POLYMORPHISM
ABSTRACTION
CONCLUSION
OOP in JAVA
Basics of OOP
Before we discuss about 4 piller we have to understand these two concept
Class Object
A Class is like an object In real life, a car is an object. The
constructor, or a "blueprint" for car has attributes, such as weight
creating objects. and color, and methods, such as
drive and brake.
OOP in JAVA
INHERITANCE
Inheritance is a fundamental concept in object-oriented programming (OOP)
where a new class, known as the child class or subclass, can inherit attributes
and methods from an existing class, called the parent class or superclass.
EXAMPLE OF INHERITANCE
OUTPUT
ENCAPSULATION
Encapsulation in Java means
wrapping data (variables) and
methods (functions) together within
a class, where the data is hidden
from outside access and can only
be accessed through designated
methods, ensuring data integrity
and security.
EXAMPLE OF ENCAPSULATION
OUTPUT
POLYMORPHISM
Polymorphism means "many forms", and it
occurs when we have many classes that
are related to each other by inheritance.
EXAMPLE OF POLYMORPHISM
OUTPUT
Abstraction
Data hide
Data abstraction is the process of hiding certain details and showing
only essential information to the user.
REAL LIFE EXAMPLE
EXAMPLE OF ABSTRACTION
OUTPUT
Sources-
[Link]
[Link]
[Link]