Question What is encapsulaiton explain in Details with the code ? |
|
|
| Encapsulation is a process of hidding unessential charcterstics of an object, so that there are only important features become available |
| Encapsulation is a process of hidding unessential charcterstics of an object, so that there are only important features become available |
| It is the process of binding data and function together so the only member function can have access of the data. |
| binding the data in single unit |
|
| Hiding the main functionality in background |
| Hiding the main functionality in background |
| Binding of data and methods in single unit is called encapsulation |
| Encapsulation specifies the different classes which can use the members of an object. The main goal of encapsulation is to provide an interface to clients which decrease the dependency on those features and parts which are likely to change in future. This facilitates easy changes to the code and features. |
| The process of hiding up of the data in a single unit is called encapsulation.
For Example:- The medicine will be stored inside the capsule the human view will be on outer layer ie) capsule, as like that data will be hided here. |
|
| wrappingup of data into single unit. |
| wrappingup of data into single unit. |
| binding up of dat and functions |
| testung |