Which of the following is the most suitable definition for encapsulation?
(a) Ability of a class to derive members of another class as a part of its own definition
(b) Means of bundling instance variables and methods in order to restrict access to certain class members
(c) Focuses on variables and passing of variables to functions
(d) Allows for implementation of elegant software that is well designed and easily modified
The question was asked in a job interview.
I would like to ask this question from Encapsulation in section Classes and Objects, Inheritance, Polymorphism, Encapsulation and Exception Handling of Python