Chapter5_1-ClassesAndObjectsInDepth

Functionality abstraction is the process of

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: racted, • or alternatively, an important piece of functionality may be omitted. – Functionality abstraction is the process of determining which functionality is important. view – For example, depending on how a car is viewed (e.g. in terms of something to be registered, or alternatively something to be repaired, etc.) different sets of characteristics will emerge as being important. Page 4 Dr. S. GANNOUNI & Dr. A. TOUIR view view Introduction to OOP Encapsulation Principle • Abstraction involves reducing a real world entity to its abstraction essential defining characteristics. • Encapsulation extends this idea by also modeling and linking each data of an entity to the appropriate functionality of that entity. Page 5 Dr. S. GANNOUNI & Dr. A. TOUIR Introduction to OOP Encapsulation Gives Classes • OOP makes use of encapsulation to ensure that data is used in an appropriate manner. – by preventing from accessing data in a nonintended manner (e.g. asking if an Integer is true or false, etc.). • • Through encapsulation, only a predetermined appropriate group of operations may be applied (have access) to the data. Place data and the operations that act on that data in the same class. Page 6 • Encapsulation is the OO principle that all...
View Full Document

Ask a homework question - tutors are online