what is encapsulation
Answers
Answered by
8
Answer:
In object-oriented programming (OOP), 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.[1] Encapsulation is used to hide the values or state of a structured data object inside a class, preventing unauthorized parties' direct access to them.
Answered by
1
Answer:
The Basic concept of encapsulation says that data flows down the protocol hierarchy, headers (and trailers) get appended to it and data moves up the hierarchy headers (and trailers) get stripped off.
Example to illustrate :-
- Trivial file transfer protocol (TFTP).
- TFTP client transfer 200 bytes of data.
- 4 Bytes of TFTP header gets added.
Similar questions