This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ows objects
containing the appropriate
operations that could be applied
on the data they store.
– My Nokia-N71 cell-phone
• My contacts,
• Missed calls
• … etc. – My Nokia-N71 may perform the
following operations on the data
• Edit/Update/Delete an existing
• Add a new contact
• Display my missed calls.
• …etc. Dr. S. GANNOUNI & Dr. A. TOUIR Introduction to OOP Information Hiding Principle
• Limit access to data only to internal operations that need it. • OO classes hide the data as private data members and use public accessor
operations to get at it.
• The scope of the data is limited to the class. Page 7 Dr. S. GANNOUNI & Dr. A. TOUIR Introduction to OOP Information Hiding Objectives
• Information hiding protects from exposing: • data items (attributes).
• the difference between stored data and
• the internal structure of a class.
• implementation details of a class. Page 8 Dr. S. GANNOUNI & Dr. A. TOUIR Introduction to OOP Encapsulation and
• Encapsulation (is a language construct that ) facilitates the bundling of data with the
operations acting on that data. • Place data and the operations that perform...
View Full Document
This document was uploaded on 03/03/2014.
- Spring '14