Definicije iz spoljašnjih izvora: Šta je to enkapsulacija? - na engleskom
------ https://www.techopedia.com/definition/3787/encapsulation-c
Encapsulation, in the context of C#, refers to an object's ability to hide data and behavior that are not necessary to its user. Encapsulation enables a group of properties, methods and other members to be considered a single unit or object.
----- https://www.codeproject.com/Articles/22769/Introduction-to-Object-Oriented-Programming-Concep
(Ovako je izgledala definicija koju je Vaš predavač učio u toku svog školovanja
The encapsulation is the inclusion-within a program object-of all the
resources needed for the object to function, basically, the methods and
the data. In OOP the encapsulation is mainly achieved by
creating classes, the classes expose public methods and properties. A
class is kind of a container or capsule or a cell, which encapsulate a
set of methods, attribute and properties to provide its indented
functionalities to other classes. In that sense, encapsulation also
allows a class to change its internal implementation without hurting the
overall functioning of the system. That idea of encapsulation is to
hide how a class does its business, while allowing other classes to make
requests of it.
------- https://www.geeksforgeeks.org/c-sharp-encapsulation/
Encapsulation is defined as the wrapping up of data under a single unit. It is the mechanism that binds together code and the data it manipulates. In a different way, encapsulation is a protective shield that prevents the data from being accessed by the code outside this shield.
------- https://www.tutorialspoint.com/csharp/csharp_encapsulation.htm :
Encapsulation is defined 'as the process of enclosing one or more items within a physical or logical package'. Encapsulation, in object oriented programming methodology, prevents access to implementation details.
Abstraction and encapsulation are related features in object oriented programming. Abstraction allows making relevant information visible and encapsulation enables a programmer to implement the desired level of abstraction.
Encapsulation is implemented by using access specifiers. An access specifier defines the scope and visibility of a class member. C# supports the following access specifiers −
- Public
- Private
- Protected
- Internal
- Protected internal