"Data hiding " is achieved via encapsulation or abstraction? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

"Data hiding " is achieved via encapsulation or abstraction?

24th Dec 2016, 7:37 AM
Ketan Bhalerao
Ketan Bhalerao - avatar
3 Answers
+ 4
Both, but its more on the side of avoiding free flow of data on programs. These things will be quite important when you start working on medium-large scaled project involving quite a couple of classes
24th Dec 2016, 8:46 AM
Wen Qin
Wen Qin - avatar
+ 3
Although it is possible to say both, the real answer would be 'encapsulation' . Reason : Abstraction only allows making relevant information visible, meaning that it makes the attention all diverted into relevant information. "Useless" information still can be seen if the system wanted to. However, encapsulation hides information from the system, meaning that even if the system wanted more "useless" information, it can't get it.
24th Dec 2016, 7:42 AM
Wen Qin
Wen Qin - avatar
0
this means DATA HIDING refers to avoiding free flow of data on program or Making strict access conditions over critical data?
24th Dec 2016, 8:37 AM
Ketan Bhalerao
Ketan Bhalerao - avatar