Computer Science, asked by neerajsingh9564, 11 months ago

define encapsulation with example not a real world example​

Answers

Answered by sha91
2

Answer:

it's so easy to understand the real life example of encapsulation is :

supposed you have a vacant/empty plate

now fill up with vegetables, rice, chapati and a spoon as it holds whole foods in a plate. so encapsulation is the process of binding of data into a classes here classes like a plate and data is like a foods into plate

Answered by Anshu33845
0

Answer:

It is very useful and easier to understand the concept of encapsulation. As we know the 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 :-

  1. TFTP client transfer 200 bytes of data.
  2. 4 Bytes of TFTP header gets added.

Similar questions