Abid Ali
SAP Technical Consultant
Understanding
OO ABAPwith our daily activities
Concepts
Abid Ali
SAP Technical Consultant
1⃣ Class & Object → Blueprint and House 🏠
•Class = Blueprint of a house
•Object = Actual house built from the blueprint
🔹 Example:
Imagine you are an architect designing a House
Blueprint. The blueprint defines properties like color,
number of rooms, and windows. However, an
actual House is built based on this blueprint.
Abid Ali
SAP Technical Consultant
2⃣ Inheritance → Parent & Child Relationship 🧑🧒
•Parent Class (Super Class) = Defines common
characteristics
•Child Class (Sub Class) = Inherits properties and behaviors
but can also have its own
🔹 Example:
A Parent has certain characteristics like eye color and
surname. A Child inherits these but can also have their own
unique qualities like height or voice.
Abid Ali
SAP Technical Consultant
3⃣ Polymorphism → Different Vehicles, Same Action 🚗🛵
•Same method name behaves differently in different
classes
🔹 Example:
Think about a Car and a Bike. Both have a move() function,
but a car moves on four wheels, while a bike moves on two
wheels.
Abid Ali
SAP Technical Consultant
4⃣ Encapsulation → ATM Machine 🏦
•Encapsulation = Hiding data inside a class and only allowing
access via methods
🔹 Example:
An ATM machine allows you to withdraw money, but you
can’t see the internal database or logic behind it. You only
interact with the ATM through buttons and screens.
Abid Ali
SAP Technical Consultant
5⃣ Abstract Class → Mobile Phones 📱
•Abstract Class = Defines structure but cannot be instantiated
directly
🔹 Example:
A Mobile Phone has basic features like calling and
messaging, but brands like Apple and Samsung implement
them differently.
Abid Ali
SAP Technical Consultant
6⃣ Interface → Remote Control & TV 📺
•Interface = Defines methods but does not implement them
🔹 Example:
A Remote Control has buttons like Power, Volume, and
Channel, but different TV brands (Sony, LG, Samsung)
implement them differently.
Abid Ali
SAP Technical Consultant
Thank You
& Keep
Reposting
SAVE
AND
SHARE