8 Differentiate between encapsulation and inheritance write one example for each
Answers
Answered by
5
Explanation:
Encapsulation is a mechanism that binds together c.o.d.e and the data it manipulates whereas Inheritance is the mechanism by which a class acquires the properties and methods of another class. ... Classifying Vehicles as Car, Bike, Bus, Truck, etc. is an example of Inheritance.
Answered by
1
Answer:
Encapsulation is a mechanism that binds together c.o.d.e and the data it manipulates whereas Inheritance is the mechanism by which a class acquires the properties and methods of another class. ... Classifying Vehicles as Car, Bike, Bus, Truck, etc. is an example of Inheritance.
Explanation:
Similar questions