Computer Science, asked by param1242, 1 day ago

8 Differentiate between encapsulation and inheritance write one example for each​

Answers

Answered by llAestheticKingll91
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 sofianhendrik
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