ICSE Class 10 Computer Applications
Question 11 of 24
Object Oriented Programming Concepts — Question 11
Back to all questions 11
Question Question 11
Explain the difference between Inheritance and Encapsulation with suitable examples.
Encapsulation is a mechanism that binds together code and the data it manipulates whereas Inheritance is the mechanism by which a class acquires the properties and methods of another class. An ATM binding together the different denominations of currency notes and all the operations required to withdraw cash is an example of Encapsulation. Classifying Vehicles as Car, Bike, Bus, Truck, etc. is an example of Inheritance.