OOP Concepts In Simple Terms
CLASS
A class is a blueprint for creating objects (a particular data structure), providing initial values for state (member variables or attributes), and implementations of behavior (member functions or methods).
OBJECTS
Object is an instance of a class which has the structure of its blueprint but also owns its unique state and behavior.
ENCAPSULATION
Encapsulation is achieved when each object keeps its state private, inside a class. Other objects don't have access to this state.
ABSTRACTION
Abstraction means that each object should only expose a high-level mechanism for using it. This mechanism should hide internal implementation details.
INHERITANCE
Inheritance is a mechanism in which one class acquires the property of another class. For example, a child inherits the traits of his/her parents.
POLYMORPHISM
Polymorphism is a OOPs concept where one name can have many forms.
Comments
Post a Comment