ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C++  >>  OOPS
 
 


 

 
 STL interview questions  STL Interview Questions
 OOPS interview questions  OOPS Interview Questions
 C++ General interview questions  C++ General Interview Questions
Question
Explain the concept of abstracion and encapsulation with 
one example. What is the difference between them?
 Question Submitted By :: Kshiti
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Explain the concept of abstracion and encapsulation with one example. What is the difference between them?
Answer
# 1
ENCAPSULATION-> 
* It is a mechanism which unites the code and the data it 
manipulates.

*It keeps them safe from external interference and misuse, 
thus enforcing the separation between specification and 
implementation of ADTs. Hence it enables the debugging of 
program easily.

DATA ABSTRACTION->
* It is the creation of new data types [ADTs] using 
encapsualted-items that are well suited to an application 
to be programmed.

* It is a powerful technique resulting in optimal, more 
readable and flexibles programs.


*******U r most welcome to challenge with my answer*****
 
Is This Answer Correct ?    7 Yes 0 No
Purba Phalguni Mishra, Gandhi
 
  Re: Explain the concept of abstracion and encapsulation with one example. What is the difference between them?
Answer
# 2
(1)Abstraction:
To implement real world entity into program. Class uses the 
concept of abstraction.
->abstraction is a process of mimicking a behavior.
->Simplifying complex reality by modeling classes 
appropriate to problem.
->Abstraction is a process that involves identifying the 
crucial behavior of an object and eliminating irrelevant 
and tedious details. 


(2)Encapsulation:
->Binding the data and code to access that data. 
Encapsulation only refers to a container which has a data 
and its related functions in it.
->When an objects state and behavior are kept together they 
are encapsulated. The data and the methods that manipulated 
that data are stored together in cohesive unit.
 
Is This Answer Correct ?    0 Yes 0 No
Aarti Ashar
 
 
 

 
 
 
Other OOPS Interview Questions
 
  Question Asked @ Answers
 
what is the usage of clas templates  5
What are the advantages of inheritance?  8
In what situation factory design patterns,DAO design patterns,singleton design patterns should be applied.?  2
what is the use of mutable key word HCL2
Name an advantage of array over linked list? IBM21
What is the difference between C++ and java?  3
What do you mean by inline function?  2
can we make a class static without using static keyword? Aspire3
how can we design a magic square in c++?or suggest me the basic idea of it.  1
what is virtual function? Infosys12
What is Object and Class? What are the differences between them?  3
What is an orthogonal base class?  1
difference between overloading and overridding  6
Name an advantage of linked list over array? IBM9
What is the Advantage of Interface over the Inheritance in OOPS?  2
what is abstract class ? when is used in real time ? give a exp  3
In multilevel inheritance constructors will be executed from the .... class to ... class TCS2
Should you protect the global data in threads? Why or why not? IBM2
what is inline function?  1
WHAT IS THE DIFFERENCE BETWEEN OBJECT BASED & OBJECT ORIENTD PROGRAMMING LANGUAGE.(GIVE AT LIST 4 PIONT) TCS1
 
For more OOPS Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com