What is the difference betwwen in Abstractionand Encapsulation.explain with example

Showing Answers 1 - 8 of 8 Answers

smithi

  • May 6th, 2006
 

abstraction:It refers to the act of representing essential features without including the background details.

for example: if a customer wants to buy a car.he looks at its color,perfomance etc but he doesnt look at things like how these are functioning internally etc.

encapsulation:the wrapping up of data and functions into a single unit called class is called encapsulation.

  Was this answer useful?  Yes

bharat

  • Jun 4th, 2006
 

Abstraction means implementation hiding and Encapsulation means data hiding.

  Was this answer useful?  Yes

praveen

  • Jun 13th, 2006
 

   

                    hai,

iam not understanding what ur saying .please give me a clean information.

                                     thanking u.

         

  Was this answer useful?  Yes

Aashish Renapurkar

  • Jul 4th, 2006
 

Abstraction:It refers to the act of representing essential features without including the background details.for example:If a customer wants to buy a car.he looks at its color,perfomance etc but he doesnt look at things like how these are functioning internally etc.Encapsulation:The wrapping up of data and functions into a single unit called class is called encapsulation

  Was this answer useful?  Yes

ghunghru

  • Apr 21st, 2009
 

Abstraction is just like a Hotel room where a single person wants only
1bed+bathroom but family required minimum of double bed +bathroom. Whereas few
people want AC system or hot water system or TV like accessories but other
don’t. During the designing of hotel all requirements will considered. So that
hotel will produce more profit.In the same way, when an object is fulfill a
variety of requirement then an object having abstraction feature.Take an example
of hotel only to understand, what is encapsulation? How many staff entertaining
all requirements of guests visited in a hotel? From where they purchased all
bed, desk, Ac system, TV etc? Beside of all such complexities, we enjoy the
hotel room during our journey. A hotel is not a construction of brick but it is
having rooms with well furnished, staff to entertain request. This is what
encapsulation. When an object having many data members and methods to fulfill
the different requirements, then an object having encapsulation feature.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions