Computer Science, asked by ashish6035, 1 year ago

Please explain:- Encapsulation.

Answers

Answered by Princess1234567
0
Heya.....❤❤❤

here is ur answer....

the action of enclosing something in or as if in a capsule

hope it helps...

plzz mark me as brainliest my dear !!!!

❤❤❤

Answered by cyrusbishop
0

Answer:

A encapsulation is the system of wrapping data and functions into a single unit.

The state of an object depends upon the values of its attributes at any given point of time. Since the state and behaviour of objects are interwoven, they are said to encapsulate state and behaviour.

For  instance, a car objects has characteristics like number of wheels, seats and so on. Its state is represented as halted, moving and stationary and its behaviour is that it can move, stop, blow horn and so on. We cannot segregate them.

Thus, we can say that objects encapsulate their state and behaviour. As their state and behavious are interlinked, they cannot exist separately.

Similar questions