Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors

PPL: Abstraction & Encapsulation

ABSTRACTION AND ENCAPSULATION


MCQs on Encapsulation

Q1. Which of these is not a fundamental features of OOP?
a) Encapsulation    
b) Inheritance
c) Instantiation
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?
a) True
b) False
Q4. Which of the following concepts means wrapping up of data and functions together?
(a) Abstraction
(b) Encapsulation
(c) Inheritance
(d) Polymorphism
Q5. Which of the following is a technique for hiding the internal implementation details of an object?
(a)Encapsulation
(b)Polymorphism
(c)Inheritance
(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?
(a)Polymorphism
(b)Inheritance
(c)Templates
(d)Encapsulation
MCQs Answers
Q1. (c)
Q2. (b)
Q3. (b)
Q4. (b)
Q5. (a)
Q6. (b)

Leave a Comment