Object Oriented Programming With Real world Example

Kajasumanie Kanapathipillai
4 min readMar 26, 2018

https://iamkajas.blogspot.com/2023/12/object-oriented-programming-with-real.html

You are familiar with OOP concept theoretically but if interviewer ask to tell the concept with OOP concept then a lot of us are fail to answer.

Basically why we are write coding ,to solve our real world problem right.
In OOP a logic is right base on the object with this features
1.abstraction
2.encapsulation
3.inheritance
4.polymorphism
There are a lot of Car,bike,ATM and coffee machine.and there brands and name also different.
In OOP those are called object .

Objects logic are done by classes for example ,by phone we can call,Bluetooth ,take photo etc. those every logic
will be divide as classes.When we are creating class we need consider about SOLID principle.

Example for object and class

Abstraction
Before know about abstraction in OOP.We need to know what is the meaning of abstraction in English.
Abstraction means only show relevant data and details rest of others are…

--

--