WHAT IS THE DIFFERENCE BETWEEN ABSTRUCTION AND
ENCAPSULATION?
PLEASE EXPLAIN IT.
Answers were Sorted based on User's Feedback
Answer / mahesh_b.tech@2008
ABSTRUCTION:
Process of providing the neccesary properties & operations
of an object is called as abstuction
Example take car the car user only know things reqired.
he don't no the internal functionality of the car b'coz it
is not required for the user .
properties like car:colour,number,model etc.
operations like car:move front,backetc.
ENCAPSULATION:
Process of providing all the properties&operayion of entity
in one place is called as encapsulation.
In java operations are called as methods,properties are
called as variables.
The place where you were write the variables &properties is
called as class.
Is This Answer Correct ? | 31 Yes | 8 No |
Answer / narender_niit
abstraction:
abstraction means providing the relevant information only
and hiding other information..
encapsulation:
encapsulation means capsuling of data in the class..in
encapsulation the data members are declared in a class.and
we u want to use that variables only the copy of the
variables goes there which we use in other public
classes.this generates the concept of information hiding.
encapsulation also provide scurity to the data variables
Is This Answer Correct ? | 8 Yes | 1 No |
Answer / ronny
Process of providing the neccesary properties & operations
of an object is called as abstuction
Is This Answer Correct ? | 6 Yes | 0 No |
Answer / b.vara lakshmi
abstaction means hiding information details.it creates a
new data item with encapsulated objects.
encapusulation means it encapsulates both the code and data
and it manipulates the both and keeps safe from
interferences and misuse.
Is This Answer Correct ? | 7 Yes | 1 No |
Answer / sdk
Encapsulation prevents the code and data of one class to be
accessed by code which is out side class
Abstraction refers to hiding of irrelevant data.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / vikas
In C++ terms, abstraction is achieved by access modifiers:
private and protected. Encapsulation is achieved by classes
Vikas
http://www.cppquestions.com/
Is This Answer Correct ? | 2 Yes | 6 No |
Answer / ganesh
ABSTRACTION
An abstract class is a parent class that allows inheritance
but can never be instantiated. Abstract classes contain one
or more abstract methods that do not have implementation.
Abstract classes allow specialization of inherited classes.
ENCAPSULATION:
Wrapping up of data into a single unit..
Is This Answer Correct ? | 7 Yes | 17 No |
We have a scale and 7 balls. 1 ball is heavier than all the rest. How to determine the heaviest ball with only 3 possible weighing attempts?
what is the new version of c++
1 Answers Ignou, Pramata, Satyam,
Why do we use oop?
How to calculate the age from the date of birth by using the program?
how to find the correct email address format by using the programe?
What language is oop?
In OverLoading concept,Why they are not consider return value and why they are consider only parameters in method? For ex: public int Add(int a,int b){...} public String Add(int a,int b){...}
Define a class to represent a bank account. Include the following members: Data Members: Name of the Depositor Account Number Type of Account Balance amount in the account Member Functions: To assign the initial values. To deposit an account. To withdraw an amount after checking the balance. Write a C++ main program to display account number, name and balance.
How to hide the base class functionality in Inheritance?
1. Wrie a function which returns the most frequent number in a list of integers. Handle the case of more than one number which meets this criterion. public static int[] GetFrequency(int[] list)
which structured data type is not used in c++? 1.union 2.structure 3.string 4.boolean
When you define a integer it gets stored in which data structure?(Stack or a heap)