Explain the concept of abstracion and encapsulation with
one example. What is the difference between them?
Answer Posted / aarti ashar
(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 ? | 3 Yes | 4 No |
Post New Answer View All Answers
How do you use inheritance in unity?
What is a class in oop?
What is the difference between procedural programming and oops?
to find out the minimum of two integer number of two different classes using friend function
Is enum a class?
What is and I oop mean?
Which type does string inherit from?
officer say me - i am offered to a smoking , then what can you say
What is abstraction example?
what is difference between class template and template class?
What is the point of oop?
What is methods in oop?
What is persistence in oop?
What is oops and why we use oops?
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?