Computer Science, asked by aishaakbar, 8 months ago

what is the difference between inheritance and encapsulation with suitable examples​

Answers

Answered by manikanth91
1

Answer:

please search it in google

Answered by Anonymous
3

</p><p>\huge\underline \mathcal{Answer}

Inheritance

Inheritance is the mechanism of basing an object or class upon or class, retaining similar implementation. Also defined as deriving new classes from existing ones such as super class or base class and then forming them into a hierarchy of classes.

Ex- C++

Encapsulation

Encapsulation refers to the bundling of data with the methods that operate on that data, or the restricting of direct access to some of an object's components.

Ex - OOP

Similar questions
Math, 8 months ago