Advertisements
Advertisements
Question
Give two differences between Data Hiding and Encapsulation.
Distinguish Between
Solution
S. No. | Data Hiding | Encapsulation |
1. | Data security is the main focus of data hiding. | The goal of encapsulation is primarily to hide the system's complexity. |
2. | Restricting the use of data is the primary goal of data hiding. | Data and function wrapping is the subject of encapsulation. |
shaalaa.com
Is there an error in this question or solution?
Chapter 1.01: Introduction to Object Oriented Programming Concepts - EXERCISES [Page 9]