ABSTRACTION AND ENCAPSULATION
MCQs on Encapsulation
Q1. Which of these is not a fundamental features of OOP?
Q2. 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
Q3. Private members of a class cannot be accessed. True or False?
Q4. Which of the following concepts means wrapping up of data and functions together?
Q5. Which of the following is a technique for hiding the internal implementation details of an object?
(d)All of the above
Q6. Which of the following should be used to implement a ‘Like a’ or a ‘Kind of’ relationship between two entities?