Encapsulation
Binding(or wrapping) code and data together into a single unit is known as Encapsulation.
For Example:
Capsule, it is wrapped with different MedicinesClasses Encapsulate (.. i.e wrap) attributes and member functions into objects and this is known as Encapsulation.
Data Hiding
Data is made hidden from the user by making them private.This is known as Data Hiding
For Example:
Private or Protected
Abstraction
Hiding internal detail and showing functionality is called Abstraction.
For Example:
Phone call, we dont know the internal processing
0 comments:
Post a Comment