Vous êtes sur la page 1sur 1

Abstraction: "One point of confusion regarding abstraction is its use as both process and an entity.

Abstraction, as a process, denotes the extracting of the essential details about an item, or a group of items, while ignoring the inessential details. Abstraction, as an entity, denotes a model, a view, or some other focused representation for an actual item." Information Hiding: "Its interface or definition was chosen to reveal as little as possible about its inner workings." [Parnas, 1972b] "Abstraction can be [] used as a technique for identifying which information should be hidden." "Confusion can occur when people fail to distinguish between the hiding of information, and a technique (e.g., abstraction) that is used to help identify which information is to be hidden." Encapsulation: "It [] refers to building a capsule, in the case a conceptual barrier, around some collection of things." [Wirfs-Brock et al, 1990] "As a process, encapsulation means the act of enclosing one or more items within a [] container. Encapsulation, as an entity, refers to a package or an enclosure that holds (contains, encloses) one or more items." "If encapsulation was 'the same thing as information hiding,' then one might make the argument that 'everything that was encapsulated was also hidden.' This is not obviously not true." Conclusion: "Abstraction, information hiding, and encapsulation are very different, but highly-related, concepts. One could argue that abstraction is a technique that help us identify which specific information should be visible, and which information should be hidden. Encapsulation is then the technique for packaging the information in such a way as to hide what should be hidden, and make visible what is intended to be visible." Information hiding is the principle that users of a software component (such as a class) need to know only the essential details of how to initialize and access the component, and do not need to know the details of the implementation. Encapsulation : Wrapping up of data and methods into a single unit is Encapsulation (e.g. Class) Abstraction : It is an act of representing only the essential things without including background details. (e.g. Interface)

Vous aimerez peut-être aussi