Concepts Of Object Oriented Programming with C++
- OOPS stands for Object-Oriented Programming.
- The Object Oriented Programming has been developed to overcome the drawbacks of procedural and modular programming.
- It is widely accepted that object oriented programming is the most important and powerful way of creating software.
- OOP is the term used to describe a programming approach based on classes and objects.
- OOPS provide clear structure for the programs.
- OOPS helps to create full reusable applications with less code and shorter development time.
It is the concepts to understand some of the extensively in object-oriented programming. These include:
👉 Object
👉 Class
👉 Data abstraction
👉 Encapsulation
👉 Inheritance
👉 Data binding
👉 Polymorphism
👉 Class
👉 Data abstraction
👉 Encapsulation
👉 Inheritance
👉 Data binding
👉 Polymorphism
Object
• Objects are the basic run-time entities in an object-oriented system.
• When a program is executed, the objects interact by sending messages to one another. Each object contact data and code to manipulate the data.
• When a program is executed, the objects interact by sending messages to one another. Each object contact data and code to manipulate the data.
Class
• Class mentioned that object contains data, and code to manipulate that data.
• The entire set of data and code of an object can be made a user-defined data type with the help of a class. A class is thus a collection of objects of similar type is know as class.
• The entire set of data and code of an object can be made a user-defined data type with the help of a class. A class is thus a collection of objects of similar type is know as class.
Data Abstraction
• Abstraction refers to the act of representing essential features without including the background details.
• Classes use the concepts of abstraction to define a list of abstract attributes and function which operate on these attributes.
• Classes use the concepts of abstraction to define a list of abstract attributes and function which operate on these attributes.
Encapsulation
• Encapsulation is about binding the data and function are bound together into a single unit is know as Encapsulation.
• 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 it.
• This encapsulation of data from direct access by the program is called data hiding or information hiding.
• 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 it.
• This encapsulation of data from direct access by the program is called data hiding or information hiding.
Inheritance
• Inheritance is the process by which objects of one class acquire the proper of objects of another class. It supports the concept of hierarchical classification.
• Inheritance is the technique of building new classes or derived class from an existing class or base class. The most important advantage of inheritance is code reusability.
• Inheritance is the technique of building new classes or derived class from an existing class or base class. The most important advantage of inheritance is code reusability.
Data Binding
• Data binding Binding is the link between a function call and the function definition.
• When a function is called in C++, the program control binds to the memory address where that function is defined.
• When a function is called in C++, the program control binds to the memory address where that function is defined.
Polymorphism
• Polymorphism is the ability of a message or function to be displayed in more than one form.
• Polymorphism is simply, “One name many forms”. It is the ability of the function to take more than one form.
• For Example, A Single person may take many forms such as student in College, Child for the parent, etc..
• Polymorphism is simply, “One name many forms”. It is the ability of the function to take more than one form.
• For Example, A Single person may take many forms such as student in College, Child for the parent, etc..