Chapter5_1-ClassesAndObjectsInDepth

My nokia n71 cell phone stores my contacts missed

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ows objects containing the appropriate operations that could be applied on the data they store. – My Nokia-N71 cell-phone stores: • My contacts, • Missed calls • … etc. – My Nokia-N71 may perform the following operations on the data it contains: • Edit/Update/Delete an existing contact • 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 derived data. • the internal structure of a class. • implementation details of a class. Page 8 Dr. S. GANNOUNI & Dr. A. TOUIR Introduction to OOP Encapsulation and Information Hiding • 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.

Ask a homework question - tutors are online