Which feature can be implemented using encapsulation?
A. Vehicle -> Car -> Truck
B. Pet -> Animal -> Dog
C. Person -> Employee -> Manager
D. User -> Admin -> Guest
Answers
Answered by
1
The following feature can be implemented using encapsulation
C. Person -> Employee -> Manager
Answered by
2
The feature which can be implemented using encapsulation is Pet → Animal → Dog. To understand encapsulation, it is necessary to understand abstraction first. Abstraction has been defined as the implementation of the essential features of a system without getting involved in its entire complexity. And, encapsulation is nothing more but the implementation of the abstraction (which is just a concept whereas encapsulation is the mechanism of binding/wrapping data to prevent it from unauthorized access).
Similar questions