Object Oriented Programming  Concepts:

The object oriented paradigm is built on the foundation laid by the structured programming concepts. The fundamental change in OOP is that a program is designed around the data being operated upon rather upon the operations themselves. Data and its functions are encapsulated into a single entity.OOP facilitates creating reusable code that can eventually save a lot of work. A feature called polymorphism permits to create multiple definitions for operators and functions. Another feature called inheritance permits to derive new classes from old ones. OOP introduces many new ideas and involves a different approach to programming than the procedural programming.
Benefits of Object-Oriented Programming: Data security is enforced. Inheritance saves time. User defined data types can be easily constructed. Inheritance emphasizes inventions of new data types. Large complexity in the software development can be easily managed.

Basic C++ Knowledge:
C++ began its life in Bell Labs, where Bjarne Stroustrup developed the language in the early 1980s. C++ is a powerful and flexible programming language. Thus, with minor exceptions, C++ is a superset of the C Programming language.
The principal enhancement being the object –oriented concept of a class. A Class is a user defined type that encapsulates many important mechanisms. Classes enable programmers to break an application up into small, manageable pieces, or objects.

Basic concepts of Object-Oriented Programming:

1) Object: Objects are the basic run time entities in an object-oriented system. They may represent a person, a place, a bank account, a table of data or any item that the program has to handle.
2) Class: The entire set of data and code of an object can be made of a user defined data type with the help of a class in fact Objects are variables of the type class. Once a class has been defined, we can create any number of objects belonging to that class. A class is thus a collection of objects of similar type.
For example: mango, apple, and orange are members of the class fruit.
Ex: fruit mango; // will create an object mango belonging to the class fruit.
3) Data Abstraction and Encapsulation: The wrapping up of data and functions in to a single unit is known as encapsulation. Data encapsulation is the most striking feature of a class. The data is not accessible to the outside world and only those functions which are wrapped in the class can access. This insulation of the data from direct access by the program is called data hiding. Abstraction refers to the act of representing essential features without including the background details or explanations. Since the classes use the concept of data abstraction, they are known as Abstraction Data Type (ADT).
4) Inheritance: Inheritance is the process by which objects of one class acquire the properties of objects of another class.
For example: The bird 'robin ' is a part of the class 'flying bird' which is again a part of the class 'bird'. The concept of inheritance provides the idea of reusability.
5) Polymorphism: Polymorphism is another important OOP concept. Polymorphism means the ability to take more than one form. An operation may exhibit different instances. The process of making an operator to exhibit different behaviors in different instance is known as operator overloading.
6) Dynamic Binding: Binding refers to the linking of a function to the code to be executed in response to the call. Dynamic Binding (also known as late binding) means that the code associated with a given function which is to be used is not known until the time of the call at run-time. A function call associated with a polymorphic reference depends on the dynamic type of that reference.
7) Message Passing: An object-oriented program consists of a set of objects that communicate with each other. This involves the following basic steps:
1. Creating classes that define objects and their behavior.
2. Creating objects from class definitions, and
3. Establishing communication among objects.
Objects have a life cycle. They can be created and destroyed. Communication with an object is feasible as long as it is alive.


Thanks
Mukesh Rajput
Mukesh Rajput

Mukesh Rajput

I am a Computer Engineer, a small amount of the programming tips as it’s my hobby, I love to travel and meet people so little about travel, a fashion lover and love to eat food, I am investing a good time to keep the body fit so little about fitness also..

Post A Comment:

0 comments: