I realized a real-world example for data abstraction. Its so simple when you know how to explain it and I especially love examples if it involves food.
What is data abstraction – Its the process of hiding details that are not necessary to be known outside.
Eg: Rum Chocolate. Now you can tell your parents that you ate a chocolate and be done with it. They dont need to know that you had some rum too which was safely encapsulated in the object. So, you’ve had your share of alcohol and you’ve hidden it from the outside world. Cool eh?
Sponsored Content
Some Random posts of interest
Tagged: abstraction, chocolate, OOP, rum
No Trackbacks
12 Comments
I wanting rum chocolatte.
I wanting rum chocolatte.
I had a huge one in the morning. The size of a marie-gold biscuit and thickness of a britannia Jim-Jam biscuit, filled with rum.
I had a huge one in the morning. The size of a marie-gold biscuit and thickness of a britannia Jim-Jam biscuit, filled with rum.
er…if you are at this age and married, why would your parents worry whether you have had rum?
But that is a GREAT eg of data abstraction …also called foozling, or lying by omission!
er…if you are at this age and married, why would your parents worry whether you have had rum?
But that is a GREAT eg of data abstraction …also called foozling, or lying by omission!
strong stuff da
last time i was abroad i got lots of irish coffee chocolate! now that you reminded me i think i’ll go have one!
(workingfrom home today)
strong stuff da
last time i was abroad i got lots of irish coffee chocolate! now that you reminded me i think i’ll go have one!
(workingfrom home today)
oh i don’t know how you are but a lot of parents (including mine, and kuku’s also i guess) are very keen that their children (no matter how old) don’t drink. they think it’s evil and everyone who drinks is evil and all such!
oh i don’t know how you are but a lot of parents (including mine, and kuku’s also i guess) are very keen that their children (no matter how old) don’t drink. they think it’s evil and everyone who drinks is evil and all such!
But do they realllllly think that their children don’t drink??? And surely as a parent, they would like to know when and how much their children drink rather than bury their heads in the sand? I knew at what age my daughter started trying beer, when she tried dope…because the urge to experiment is universal and thinking that your child CAN’T and WON’T do it is compeletely unrealistic…much better to have an unjudgemental attitude to the trials, and be in the know, so that the child can turn to one and talk about the experience…oh well, different strokes for different folks…
But do they realllllly think that their children don’t drink??? And surely as a parent, they would like to know when and how much their children drink rather than bury their heads in the sand? I knew at what age my daughter started trying beer, when she tried dope…because the urge to experiment is universal and thinking that your child CAN’T and WON’T do it is compeletely unrealistic…much better to have an unjudgemental attitude to the trials, and be in the know, so that the child can turn to one and talk about the experience…oh well, different strokes for different folks…