What is the difference between abstraction and encapsulation?

can anybody give me the exact difference between abstraction and encapsulation?
as of I know,we will acheive encapsulation using classes.That means:encapsulation is keeping data and the behavior of the data in one capsule that is class.

Then what is the abstarction?

Karna
Views: 102092 | Community Opinion: 42

Tags..  Encapsulation  abstraction

Bookmark this page..



Ask a New Question Go to Home

Community Opinion/Answers
 

Abstraction vs. Encapsulation - Principles of Object Oriented Programming (OOPS):


Abstraction

In order to process something from the real world we have to extract the essential characteristics of that object.

Data abstraction can be viewed as the process of refining away the unimportant details of an object, so that only the useful characteristics that define it remain. Evidently, this is task specific.



Encapsulation

Encapsulation is one step beyond abstraction. Whilst abstraction involves reducing a real world entity to its essential defining characteristics, encapsulation extends this idea by also modeling and linking the functionality of that entity. Encapsulation links the data to the operations that can be performed upon the data.

OOP makes use of encapsulation to enforce the integrity of a type (i.e. to make sure data is used in an appropriate manner) by preventing programmers from accessing data in a non-intended manner


Through encapsulation, only a predetermined group of functions can access the data. The collective term for datatypes and operations (methods) bundled together with access restrictions (public/private, etc.) is a class.




anirudh girey (anirudhgirey@gmail.com) Said..

encapsulation is wrraping up of a data into single unit
and abstraction is hidding unnesecary background details and representing only important and essential detail



Encapsulation protects abstractions. Encapsulation is the bodyguard; abstraction is the VIP.
Encapsulation provides the explicit boundary between an object's abstract interface (its abstraction) and its internal implementation details. Encapsulation puts the implementation details "in a capsule." Encapsulation tells users which features are stable, permanent services of the object and which features are implementation details that are subject to change without notice.
Encapsulation helps the developers of an abstraction: it provides the freedom to implement the abstraction in any way consistent with the interface. (Encapsulation tells developers exactly what users can and cannot access.) Encapsulation also helps the users of an abstraction: it provides protection by preventing dependence on volatile implementation details.
Abstraction provides business value; encapsulation "protects" these abstractions. If a developer provides a good abstraction, users won't be tempted to peek at the object's internal mechanisms. Encapsulation is simply a safety featur




Ari Said..

Encapsulation is defined as the process of wrapping up the data members and member functions together into a single unit.It is dependent on the object data type.
Abstraction is the process of eliminating unnecessary details thereby highlighting the important features.It is independent of the object data type.

A real world example, consider u have setup a big building(say a company), the details regarding materials used to built (glass, bricks), type of work, manager of the company, number of floors, design of the building, cost of the building etc. can be classified as ABSTRACTION. Whereas, type of glass or bricks(grey one or red one) used, who all work for which all departments n how they work, cost of each and every element in the building etc. comes under Data ENCAPSULATION.
Another example can be of a VIP(Abstraction) and his assistant(Encapsulation).

Abstraction-outer layout, used in terms of design
Encapsulation-inner layout, used in terms of implementation.




savio sequeira Said..

abstraction is showing only essential details.
encapsulation is hiding the working of abstraction in a class or template.




pawan V Tak Said..

Abstraction: tecnically abstraction is like use of methods in a class by creating a object of that class, and u no need to know how the these methods are defined and worked.

Encapsulation: And in encapsulation keep code and data it manipulates safe from the outside code,i.e it work like a wrapper for the inside code.




Madhu N Said..

Encapsulation:
Writing up of data and functions into a Single unit is referred is "Encapsulation"




Ams Said..

Encapsulation is nothing but showing only those things which are required by wrapping up complexity & hence it is also called that it leads to data hiding but its not data hiding. Never say its data hiding… so never say its data hiding, its wrapping up complexity in one capsule that is class & hence Encapsulation…
While abstraction denotes the essential characteristics of an object which differentiates from other kinds of object...

Abstraction is achieved by making class abstract having one or more methods abstract. Which is nothing but essential characteristic which should be implemented by the class extending it.
e.g. when you inventing/designing a car you define a characteristics like car should have 4 doors, break, steering wheel etc… so anyone uses this design should include this characteristics. Implementation is not the head each of abstraction. It will just define characteristics which should be included.

Encapsulation is achieved keeping data and the behaviour in one capsule that is class & by making use of access modifiers like public, private, protected along with inheritance, aggregation or composition. So you only show only required things, that too, only to the extent you want to show. i.e. public, protected, friendly & private ka funda……
e.g. GM decides to use the abstracted design of car above. But they have various products having the same characteristics & doing almost same functionality. So they write a class which extends the above abstract class. It says how gear box should work, how break should work, how steering wheel should work. Then all the products just use this common functionality. They need not know how the gear box works or break works or steering wheal works. Indivisual product can surely have more features like a/c or auto lock etc…..

Both are powerful; but using abstraction require more skills than encapsulation and bigger applications/products can not survive with out abstraction.




rakesh Said..

encapsulation :- hiding all internal details and and ultimately showing the only one unit..........
ex:- if we take a car, the internal parts like carburetter,spark ignite,power oil,base frame,suspension,etc...... hiding all this parts and showing only a car.........

nice example na im telling this example because im mechanical engg..... and working in IT field

abstraction :- reducing the complexity of the real world and showing it in understandable manner

any thing wrong or queries please do mail me.
rocyyoung06@gmail.com




Sakthivel.S Said..

Encapsulation:
----------------------
Encapsualation is basically, wrapping up of data memebers and methods.
As you said, You hide the data for security such as making the variables as private, and expose the property to access the private data which would be public. So, when you access the property you can validate the data and set it.

Example:

Class Demo
{
private int _mark;

public int Mark
{
get { return _mark; }
set { if (_mark > 0) _mark = value; else _mark = 0; }
}
}

Abstraction:-
------------------
Abstraction have the methods which will be common for all the derived class would need. It contains the skeletion which needs to be implemented by the derived class also, which will be declared as abstract method.

Example:

abstract class CurryBase
{
public abstract void doCurryMasala();
}

public class FishCurry : CurryBase
{
public void doCurryMasala()
{
// Add Fish Curry specific contents also.
}
}




Dev Said..

Abstraction - Abstraction is the process of hiding the working style of a method.
Encapsulation - Encapsulation is the binding member data and member function and hiding data from the outside function or method.




mukesh Said..

hi,
Thanks Ams the explanation was very good that cleared my basic concepts.




NAGARAJUGURRAM Said..

hello,
Encapsulation is the process of hiding internal implementation of the class and restricting to access directly that data and can be able to access through publicly exposed methods(getters & setters..).


Abstraction is the process of hiding or removing the insufficient data and force to implement sufficient implementation for a class or method.....




praveen Said..

Enough is is Enough I must say none of you do not understand the concepts

no matter what post you hold your basics are not clear




anirudh girey Said..

here we go for more example hope this will help u guys to understand the concept:-

There are three types of oops in java.
1.Encapsulation:Encapsulation is mechanism,that binds
together data and code its manipulates.
Ex:suppose we are writing one bean.we declaring two private
variables.we are providing setters and getters methods of
two variables.These variables are accessed in that class.
2.Inheritance:To acquire the base class properties into
derived class.
Ex:class A{
m1(){
System.out.println("m1 method");
}
}
class B extends A{
m2(){
System.out.println("m2 method");
}
public static void main(String args[]){
B b = new B();
System.out.println(b.m1);
System.out.println(b.m2);
}
}
O/p is:m1 method
m2 method.
Polymorphism:one Interface to be used for a general class of
actions.
There are two types of polymorphisms.
1.Compile-time polymorphism:what object will be assigned to
the present variable.This will be evaluated at compile time.
This is known as compile-time polymorphism.
2.Run-time polymorphism:what object will be assigned to the
present variable.This will be evaluated at runtime depending
on condition.This is known as Run-time polymorphism.




komal garg Said..

the wrapping of data and method in yo a single unit called is encapsulation

abstraction refer to act of representing essential feature without including the background details............,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,




AMRIT ANAND Said..

Data abstraction:-Abstraction is the process of recognizing and focusing on important characteristics of a situation or object and leaving/filtering out the unwanted charteristics of that situation or object
ENCAPSULATION:- it is the process of binding of data and function into a single unit




Priyanka Sharma Said..

Please see/visit below link for more OOps concepts details. here you can find all details with real world example with other dot net tutorials such as asp.net, C#, JavaScript and SQL server

http://www.expertsblog.in/category/OOPs-Concepts-.aspx




C. Punitha Said..

A mechanism that prevents the data of a particular objects safe from intentional or accidental misuse by external functions is called "data Encapsulation"

The act of representing essential features without including the background details or explanations is known as "data abstraction"




naveen shekhar Said..

Data abstraction:-Abstraction is the process of recognizing and focusing on important characteristics of a situation or object and leaving/filtering out the unwanted charteristics of that situation or object
Encapsulation is the process of hiding internal implementation of the class and restricting to access directly that data and can be able to access through publicly exposed methods(getters & setters..).




Tech Interview Specialist Said..

Really nice explanation of the object oriented programming concept concept.

If you are preparing for nay technical interview do not forget to read Object Oriented Programming Interview Questions and Answers




master of oops Said..

dear guys read this carefully


What is the difference between abstraction and encapsulation?


Data abstraction:-Abstraction is the process of recognizing and focusing on important characteristics of a situation or object and leaving/filtering out the unwanted charteristics of that situation or object
Encapsulation is the process of hiding internal implementation of the class and restricting to access directly that data and can be able to access through publicly exposed methods


thank you


best of luck




Alexander From KIU Said..

abstraction deals with hiding details and exposing only particular concept or object

Encapsulated deals with ability of an object to be a container for related properties and methods that is function Programs written in older languages did not enforce any property.




Kaushal Chandu(NIIT,Dwarka-6) Said..

Abstraction
It is not necessary that you know the working of every part of the computer.Even without hardware knowledge, you can perform many tasks on the computer. Abstraction does not mean that information is unavailable. Abstraction means to show only the necessary details of an entity.


Encapsulation
Encapsulation means the act of enclosing one and more items of an entity..




A. Shinde Said..

Abstraction --- To hide the internal details and provide what can be done.
Encapsulation---To bind data with data members and provide how can be done

Suppose u r building Customer class having different members like customer name , Customer Account no, eligibility of Customer, Customer balance etc

so when some one ask for customer eligibility then it simply provide it. so that goes under abstraction.

and how that eligibility is calculated that goes under
Encapsulation.

so here encapsulation protect abstraction.




srinu Said..

Encapsulation
Encapsulation means the act of enclosing one and more items of an entity..





Data abstraction:-Abstraction is the process of recognizing and focusing on important characteristics of a situation or object and leaving/filtering out the unwanted charteristics of that situation or object
Encapsulation is the process of hiding internal implementation of the class and restricting to access directly that data and can be able to access through publicly exposed methods




kamlesh kumar yadav Said..

encapsulationand abstraction is hidding unnesecary background details and representing only important and essential detail
encasulation is wrraping up of a data into single unit
Encapsulation is defined as the process of wrapping up the data members and member functions together into a single unit.It is dependent on the object data type.
Abstraction is the process of eliminating unnecessary details thereby highlighting the important features.It is independent of the object data type.




Syed Danish haider Said..

EnsU£ation is wraping of data in appropriate manner such as c£asS functions in order.whi£e data abstraction is making data hidden from real world to protect that data and unwanted things...EnsU£ation is wraping of data in appropriate manner such as c£asS functions in order.whi£e data abstraction is making data hidden from real world to protect that data and unwanted things...EnsU£ation is wraping of data in appropriate manner such as c£asS functions in order.whi£e data abstraction is making data hidden from real world to protect that data and unwanted things...EnsU£ation is wraping of data in appropriate manner such as c£asS functions in order.whi£e data abstraction is making data hidden from real world to protect that data and unwanted things...EnsU£ation is wraping of data in appropriate manner such as c£asS functions in order.whi£e data abstraction is making data hidden from real world to protect that data and unwanted things...




sangeetha Said..

very nice answer. that real time example is easy way to understand me....................................................................................................................................................................................




Gokul Said..

Encapsulation is the process of binding the data and functions together into an single unit....
Ex:cars and owners...
all the functions of cars are encapsulated with the owners..
No one else can access it...

Abstraction is the process of providing relevant information by hiding unimportant information...
Ex:car vendor providing information related to car




tejeswarao Said..

Encapusulation : Guards the data by using private methods.(ex. Internal Mechanism of Mobile)
...................................................................
Abstration : Implementation of encapusulation by using public methods.(ex. External Mechanism of Mobile)
.................................................................




Hirak Mukherjee Said..

Encapsulation is actually a process of wrapping of data and function together as a unit and this can be made possible by using class members private.


Bidhun fuck off!!Tell yourself a bitch's son and a son of a bisexual father.




N.A.KANDIBAN Said..

Abstraction:
An essential element of object oriented programming is abstraction.. its hiding in non essential details and show only essential details.. example car....
Encapsulation:
Encapsulation is the mechanism that binds together code and the data it manipulates, and keeps both safe from outside interference and misuse.. ex: tablet




Ranjit Powar Said..

Abstraction : this is a design time process. It includes showing only essential details to user rather than other complex details....
Example : In ATM, what we do is use ATM, enter pin and withdraw money. User need to not to know what complex things are happening inside. This is called Abstraction.


Encapsulation : This is coding thing. In this, we do hide properties and behaviour from outside world so as to have security. For example, when we have class Stack and its method Push(), pop(). Now using class we can invoke these methods and utilise functionality without caring about how are these methods are implemented inside i.e. we are hiding push() implementation and just letting it be used for push operation.

Hope u have now got everything...




poonam Said..

abstraction real world example is calculator. The method of add,minus,multiply and divide will be same.
The using of this method by user is difference.
eg:
abstract class calculated
{
abstract void add();
abstract void minus();
abstract void multiply();
abstract void divide();
}
public class calculation:calculated
{
//use of the add ,minus , multiply and divide method
}




kk Said..

good ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////.




gvuyuja Said..

February really is the hottest Nike Air Force 1 month of the year. This weekend Nike Dunks the Nike “Black History Month” Collection Nike Free will release at select retailers tomorrow. However, the Nice Kicks shop will have the entire pack (minus the Air Max 1) available tonight at Air Griffey Max 1 midnight. The Nike Air Max BHM pack features a nike zoom rookie lwp, an Air Max 1, a Huarache Free, a WMNS Blazer, a Kobe VII, a KD IV, and a Air Jordan 1 . Each one features a midnight fog base with a unique African motif displayed throughout the upper.This shoe continue Jordan Shoes to use the mid length design which not only can protect your ankles but also to provide you more flexible, for Air Max Shoes the winter is coming now so Nike special feature the inner lining on the super warm plush, and created the upper on best comfortable Nike Jordan Shoes chamois design, the outsole is made on best durable rubber with the Prevent slippery pattern design.
Nike Zoom Stefan Janoski SB Velvet Brown Rattan

Nike Zoom Stefan Janoski SB Royal Blue White

Nike Zoom Stefan Janoski SB Reed / Stone

Nike Zoom Stefan Janoski SB Purple White

Nike Zoom Stefan Janoski SB Olive / White

Nike Zoom Stefan Janoski SB Obsidian White Metro Grey

Nike Zoom Stefan Janoski SB Leather Bisque / White

Nike Zoom Stefan Janoski SB Khaki Boulder

Nike Zoom Stefan Janoski SB Brown / White

Nike SB Zoom Stefan Janoski Wine Red White

Nike SB Zoom Stefan Janoski White Perf

Nike SB Zoom Stefan Janoski Tiffany

Nike SB Zoom Stefan Janoski Tan Brown

Nike SB Zoom Stefan Janoski Red Suede

Nike SB Zoom Stefan Janoski Mid Dark Brown /Black - White

Nike SB Zoom Stefan Janoski Mid Came

Nike SB Zoom Stefan Janoski Mid Black White

Nike SB Zoom Stefan Janoski Black/Midnight Fog

Nike SB Zoom Stefan Janoski Black / White

Nike SB Stefan Janoski Pacific Blue White

Nike SB Zoom Janoski Teal Abyss

Nike SB Stefan Janoski Khaki/Gum

Nike 6.0 Mavrk Mid 2 Blue Grey White Orange

Nike 6.0 Mavrk Mid 2 Blue Green Brown

Nike 6 0 Mavrk Mid 2 Blue Brown White

Nike 6.0 Mavrk Mid 2 Black White Green

Nike 6 0 Mavrk Mid 2 Black White Blue Grey

Nike 6.0 Mavrk Mid 2 Black White

Nike 6.0 Mavrk Mid 2 Black Volt Blue Orange

Nike 6.0 Mavrk Mid 2 Black Royal Blue White

Nike 6.0 Mavrk Mid 2 Black Purple Brown

Nike 6.0 Mavrk Mid 2 Black Green Blue

Nike 6. 0 Mavrk Mid 2 Black Dark Blue Grey

Nike 6.0 Mavrk Mid 2 Turbo Blue Orange Blaze Black

Nike 6 .0 Mavrk Mid 2 Red Black Blue

Nike 6.0 Mavrk Mid 2 White Black Green Volt

Nike 6.0 Mavrk Mid 2 White Grey Purple

Nike 6.0 Mavrk Mid 2 Olive Green Deep Army White

Nike 6.0 Mavrk Mid 2 Pine Green White

Nike 6.0 Mavrk Mid 2 Caldera Brown Swan Neptune Blue

Nike 6.0 Mavrk Mid 2 Brown Yellow White

Nike 6.0 Mavrk Mid 2 Brown Black

Nike Sportswear Air Rejuven8 LE Black/Red

Nike LunarHaze+ Dark Grey/Blue Spark Pure Platinum

Nike LunarHaze+ Black/Volt-Black-White

Nike LunarGlide+2 Dark Grey/Volt

Nike LunarGlide+2 Cool Grey Orange

Nike LunarGlide 3 Grey/Royal

Nike LunarGlide 3 Cool Grey/Volt

Nike LunarGlide 3 Anthracite/Volt-Challenge Red

Nike Lunarglide 2 Black Red

Nike LunarElite+ 2 White/Stealth-Obsidian

Nike LunarElite+ 2 White/Black-Volt

Nike LunarElite+ 2 Cool Grey/White-Black-Sport Red

Nike LunarElite 2 Wolf Grey/Treasure Blue

Nike LunarEclipse+ Stealth/Chrome-Black-Anthracite

Nike LunarEclipse+ Photo Blue/White

Nike LunarEclipse+ Grey Stealth-Royal

Nike LunarEclipse+ Anthracite/Lemon Twist

Nike Lunar Presto Rejuven8 Black Orange

Nike Lunar Elite Trail Dark Grey/High Voltage

Nike Lunar Eclipse 2 Gym Red

Nike Air Rejuven8 LE Orange/Yellow-Navy Blue

Nike Air Trainer Max 2 ’94 White/Total Orange

Nike Air Trainer Max 2 ’94 White/Black-Treasure Blue

Nike Air Trainer Max 2 '94 White/Dark Grey-Chlorine Blue

Nike Air Trainer Max 2 '94 White/Black-Varsity Red

Nike Air Trainer Max 2 '94 White/Black-Outdoor Green

Nike Air Trainer Max 2 '94 Blackout

Nike Air Structure Triax 91 White/Aquamarine

Nike Air Structure Triax 91 Swan Sport Red

Nike Air Structure Triax 91 Purple/Aqua

Nike Air Structure Triax 91 Neon Turquoise

Nike Air Structure Triax 91 Black/Yellow

Nike Air Structure Triax '91 White/Lucky Green-Black

Nike Air Structure Triax '91 Persian Violet/Black

Nike Air Total Max Uptempo White/Midnight Navy

Nike Air Total Max Uptempo Reggie Miller

Nike Air Total Max Uptempo Black/Volt

Nike Air Total Max Uptempo Black/Varsity Red

Nike Air Total Max Uptempo Black/Metallic Silver

Nike Air Max2 CB 94 Ink/Varsity Purple

Nike Air Max2 CB 94 Black White-Pure Purple

Nike Air Max2 CB 94 Black/Black-Varsity Red

Nike Air Max Uptempo 2 Max Orange

Nike Air Max Uptempo 2 Duke

Nike Air Max Uptempo 2 Black/White

Nike Air Max Wavy White/Black-Sport Red

Nike Air Max Wavy Midnight Navy/Photo Blue

Nike Air Max Wavy Black/Victor




Adidas jeremy scott Said..

Adidas jeremy scott wings shoes on sale! Comfort, style, fitness and personality are at the heart of modern life. The new view freedom is widespread. They are happy and take pleasure from the colorful life has already become a target for the quality of someone's life. And adidas js wings shoes just have this meaning. The art of creating footwear is often characterized by its desire to attract attention, must take advantage of seasonal trends in fashion. adidas wings are full of interesting creativity is really unforgettable, some images even have deeply influenced in our heart. In additon to this, this brand also has the unique jeremy scott wings Hoodie. The hyperbolic design attracts a lot of people ?s attention. When you wear this uniqe clothes outside, people may admire you are the fashion icon. Add this stylish version at once. jeremy scott adidas it will never make you disappointed.




Jordan 13 for sale online Said..

All. A legendary brandCheap Retro Jordan 12 was born, it isRetro 12 for cheap not only Retro Jordan 12 for salethe function Jordan 12 Retroof excellenceJordan Retro 12 for sale shoes productsCheap Jordan 13 shoes, it Retro 13 Jordans is Air Jordan 13 on salea kind Real Jordan 13 For Saleof culturalJordan 8 sale cheap symbolReal Air Jordan 8. WhenCheap Jordan 8 on sale it Jordan Retro 8 for saleis Jordan 6s for salea revolutionary product Air Jordan 6 Retro for sale, onceJordan Retro 6 for sale forAir Jordan 6 for sale violating Authentic Air Jordans 6theJordan Retro 14 shoes NBA's "unified Air Jordan 14 on saledressed" Cheap Jordan 14 saleset Air Jordan Retro 14 for sale and Retro 14 for cheapwasRetro Jordan 11 for sale banned Cheap Air Jordan Retro 11in NBAJordan 11 for sale cheap. MichaelNike Jordans 11 For Cheap persistAir Jordan 7 sale one's Jordan Retro 7 on saleold ways, stillAir Jordan Retro 7 wear buy cheap Jordan 7it to playRetro Jordan 7 for sale, and Retro Jordan 3 for salesuffer a fine Real Jordan 3 saleof up to $5000 per gameJordan 3 for sale. At the same time Cheap Air Jordan 3, Michael Jordanrare jordans for sale in the unionreal jordans for sale and international competitionjordans for sale online in his firstretro jordans for sale, all-star gamesauthentic jordans for sale debut of New Year jordan spizike noir , excellent ldm475272 reputationair jordan 6 noir, and chaussure air jordanbe theJordan 13 for sale online Boston celticschaussure jordan femme legend larryReal Jordan 13 for sale bird nicknamed chaussure jordan pas cherthe "god incarnate-Michael Jordan."




Nilesh Pawar Said..

Encapsulation:-

Encapsulation is nothing but grouping or binding data and code that operate on that data in single entity.This keeps the data safe from outside interface and misuse. One way to think about encapsulation is as a protective wrapper that prevents code and data from being arbitrarily accessed by other code defined outside the wrapper.

Abstraction:-

Abstraction is an essential entity of an OOP.It is nothing but hiding unwanted data from user/client.
for e.g:-consider Calculatesalary is an method of class Employee which contains EmpID is an argument and return monthly Employee salary.But if anybody wants to use this method then it is not required to know how object of an Class Employee calculate salary




satishkumar pansa Said..

encapsulation :is nothing but grouping the data into the single unit (methods & varibles) here we are binding the data as a single unit, in java we are acheving encapsulation through classes

Abstraction : hiding the implementation deatails and useing the essential features of the objects & methods




pravin kumar srivastav Said..

abstraction:- show only essential details to user.and hide unnecessary details.
abstraction:- show only essential details to user.and hide unnecessary details.
abstraction:- show only essential details to user.and hide unnecessary details.

Encapsulation:-is hiding the working of abstraction in a class or template.
Encapsulation:-is hiding the working of abstraction in a class or template.
Encapsulation:-is hiding the working of abstraction in a class or template.




Madhu Said..

hi abstraction is basically considering only the essential property as per the user. suppose if we take example of coffee wending machine so here abstraction is only pressing the button to take coffee or tea, rest all things are ignored.
If we see this coffee machine from mechanic point of view than he is concerned about the internal structure like any choked pipe ..or no coffee or tea powder...or some fault of wire n all,so this is abstraction from mechanic point of view.

Encapsulation:It is basically diving the internal and external expects of an object.main word is data hiding.






What do you think? Add your opinion/answer
*Name
*your opinion/answer: