21-12-2012, 06:55 PM
object oriented programming
object oriented programming.pptx (Size: 435.75 KB / Downloads: 18)
Introduction to object oriented programming
Object oriented programming is an approach that provides a way of modularizing program by creating partitioned memory area for both data and functions that can be used as templates for creating copies of such modules on demand
Objects and classes
A class is a definition of an object. It's a type just like int. A class resembles a struct with just one difference : all struct members are public by default. All classes members are private.
Remember : A class is a type, and an object of this class is just a variable.
Before we can use an object, it must be created. The simplest definition of a class is
class name
Data abstraction and encapsulation
Data abstraction and encapsulation have a very slight difference between both of them.
As they both are used to “HIDE” the internal data and methods from the outside world.
DATA ABSTRACTION
In data abstraction we do not need to know the implementation details of data type in order to use it.
Data abstraction refers to, providing only essential information to the outside world and hiding their background details i.e.. to represent the needed information in program without presenting the details.