CORE CONCEPTS OF OOPs


OOPS Concepts or Object-Oriented Programming Concepts are very important. Without having an idea about OOPS concepts, you will not be able to design systems in the object-oriented programming model.
    1.  Abstraction
    2.  Encapsulation
    3.  Polymorphism
    4.  Inheritance
Let’s look into these topics deeply.

Abstraction
Abstraction is the concept of hiding the internal details and describing things in simple terms. For example, a method that adds two integers. The internal processing of the method is hidden from the outer world. There are many ways to achieve abstraction in object-oriented programming, such as encapsulation and inheritance.

Encapsulation
Encapsulation is the technique used to implement abstraction in object-oriented programming. Encapsulation is used for access restriction to class members and methods.
Access modifier keywords are used for encapsulation in object oriented programming. For example, encapsulation is achieved using private, protected and public keywords.

Polymorphism
Polymorphism is the concept where an object behaves differently in different situations. There are two types of polymorphism – compile time polymorphism and runtime polymorphism.

Inheritance
Inheritance is the object-oriented programming concept where an object is based on another object. Inheritance is the mechanism of code reuse. The object that is getting inherited is called superclass and the object that inherits the superclass is called subclass.

Comments

Post a Comment

Popular posts from this blog

SEARCHING

ORDER BY PART-2

GROUP BY