Which of the following best describes the conceptual relationship between Encapsulation and Inheritance in OOP?
Which of the following best describes the conceptual relationship between Encapsulation and Inheritance in OOP?
Multiple Choice Options
- A
Encapsulation and inheritance are identical concepts with different terminology
- B✓ Correct Option
They are orthogonal OOP principles: encapsulation hides internal state, while inheritance shares structure and behavior
- C
Inheritance replaces encapsulation completely in large systems
- D
Encapsulation can only exist if inheritance is implemented
Detailed Technical Solution & Explanation
Encapsulation and Inheritance are orthogonal core principles of OOP. Encapsulation focuses on restricting access and binding data with functions to hide internal details, while inheritance focuses on establishing an 'is-a' relationship to reuse and extend behavior.