Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

What is called the pillars of object oriented programming ?

user-image
Question added by Jasim Ahmed , Technical and Engineering Lead , alkamilbooking.com
Date Posted: 2013/06/22
Sajjad Ali
by Sajjad Ali , Supervisor , Bagel n shake

very real time scenario from the object oriented programming are1) encapsulation.2 ) Abstraction3) Inheritance4)Polymorphism FIRST WE WILL TAKE ABOUT ENCAPSULATION it states that wrapping of code and data into a single class is called as encapsulation general example: like we wrap chapati(OR) ROTI in ALUMINIUM FOIL .
SECOND ABSTRACTION it states that hiding of complex data and showing the essential things.
general example: while driving a car we just brother about the car steering,clutch,break,accelerator.
we dost not brother about how the gear is shifting up and how the internal mechanism is going on move the car .
THIRD INHERITANCE it states that child class acquire the properties of parent class it s used for code re usability.
FOURTH POLYMORPHISM it states that one to many form general example : one person can play different roles he can play a role of father,husband,son,brother ect.

Bilel torche
by Bilel torche , responsible department , CONSTANTINE

pillars of object oriented are :Abstraction,Encapsulation ,Inheritance ,Polymorphism those four part in the core of object oriented if we want describe those four parts we will say :1-Abstraction is a process of exposing essential feature of an entity while hiding other irrelevant detail.
like when we want to have many persons (ibrahim, joseph ..etc but they have the same aspect human we will say they ahh have an abstract source it's called abstract class2-Encapsulation is when you hide your modules internal data and all other implementation details/mechanism from other modules.3-Inheritance The ability of creating a new class from an existing class.
or to get same properties from one source like apple and orange bothe heritat from one source is fruits -4.
Polymorphism A subclass can define its own unique behaviour and still share the same functionalities or behavior of its parent/base class exemple apple +orange = fruits

More Questions Like This