Monday 12 May 2014

Object-Oriented Programming



         Object-Oriented Programming
#rvcreation
Object-Oriented Programming (OOP) approach binds the data and functions that operate on that data into a single entity. Such an entity is called an object. Functions of an object can only access its data. We can’t access the data directly. For Example, if we want to read a data item in an object, we call a member function in the object; it will read the data item and return the value to us. This secures data from any changes from outside. Thus, OOP gives more emphasis on data.

A C++ program typically consists of a number of objects which communicate with each other by calling one another’s member functions. Calling an object’s member function is also referred to as sending a message to the object. The organization of a C++ Program in the above figure.

Objects are independent of each other. They are responsible for managing their own state and offering services to other objects. Therefore, new objects can be easily added whenever necessary.

Let’s have a look upon the features of OOP:
ü OOP is more data oriented
ü Programs are made up of objects which model real-world entities.
ü Data and Functions are bonded together in an object.
ü Data security exits.
ü Objects communicate through functions
ü Addition of new data and function is easy
ü OOP follows bottom-up approach.

No comments:

Post a Comment