List the main features of Object Oriented Concepts.

Features of OOP

💓OOP stands for Object-Oriented Programming and the language that support this Object-Oriented programming features is called Object-oriented Programming Language. An example of a language that supports this Object-oriented features in C++.

Features of Object-oriented Programming

💓The Objects Oriented programming language supports all the features of normal programming languages. In addition, it supports some important concepts and terminology which has made it popular among programming methodology.

The important features of Object-Oriented programming are:

💨Inheritance
💨Polymorphism
💨Data Hiding
💨Encapsulation
💨Overloading
💨Reusability

Let us see a brief overview of these important features of Object-Oriented programming

Data Hiding:

💟This concept is the main heart of Object-oriented programming.

💟The data is hidden inside the class by declaring it as private inside the class.

 💟When data or functions are defined as private it can be accessed only by the class in which it is defined.

💟When data or functions are defined as public then it can be accessed anywhere outside the class.

💟Object-Oriented programming gives importance to protecting data which in any system.

💟This is done by declaring data as private and making it accessible only to the class in which it is defined. This concept is called data hiding. But one can keep member functions as public.

So above class structure becomes

Example:


    Class classname
    {
        private:
        datatype data;
   
        public:
        Member functions
    };
    main ( )
    {
        classname objectname1,objectname2,..;
    }

Encapsulation:

💟The technical term for combining data and functions together as a bundle is an encapsulation.

Inheritance:

💟Inheritance, as the name suggests, is the concept of inheriting or deriving properties of an exiting class to get new class or classes.

💟 In other words, we may have common features or characteristics that may be needed by a number of classes. So those features can be placed in a common tree class called base class and the other classes which have these characteristics can take the tree class and define only the new things that they have on their own in their classes.

💟These classes are called derived class. The main advantage of using this concept of inheritance in Object-oriented programming is it helps in reducing the code size since the common characteristic is placed separately called as base class and it is just referred in the derived class. This provides the users with the important usage of terminology called reusability

Reusability:

💟This usage is achieved by the above-explained terminology called as inheritance. Reusability is nothing but re-usage of structure without changing the existing one but adding new features or characteristics to it. It is very much needed for any programmers in different situations. Reusability gives the following advantages to users

💟It helps in reducing the code size since classes can be just derived from existing one and one need to add only the new features and it helps users to save their time.

💟For instance, if there is a class defined to draw different graphical figures say there is a user who want to draw graphical figure and also add the features of adding colour to the graphical figure. In this scenario instead of defining a class to draw a graphical figure and colouring it what the user can do is make use of the existing class for drawing the graphical figure by deriving the class and add a new feature to the derived class namely add the feature of adding colours to the graphical figure.

Polymorphism and Overloading:

👍Poly refers to many. So Polymorphism, as the name suggests, is a certain item appearing in different forms or ways. That is making a function or operator to act in different forms depending on the place they are present is called Polymorphism. Overloading is a kind of polymorphism. In other words say for instance we know that +, – operate on integer data type and is used to perform arithmetic additions and subtractions. But operator overloading is one in which we define new operations to these operators and make them operate on different data types, in other words, overloading the existing functionality with new one. This is a very important feature of object-oriented programming methodology which extended the handling of data type and operations.

Thus the above given important features of object-oriented programming among the numerous features it has gives the following advantages to the programming world. The advantages are namely

• Data Protection or security of data is achieved by concept of data hiding

• Reduces program size and saves time by the concept of reusability which is achieved by the terminology of Inheritance

• Operators can be given new functions as per user which extends the usage.

Share:

0 comments