Site icon TestingDocs.com

What are the OOP Basic Concepts

Overview

The basic concepts and terminology associated with object-oriented programming language are as follows:

Class

Class is a template or blue-pint for the object. The class defines the properties and behavior of the object.

Object

The object is an instance of the class. It is a basic unit of an object-oriented program.

Abstraction

Abstraction is hiding implementation details or managing complexity at the system level.

Encapsulation

Encapsulation is the binding of data and the methods that operate on the data. Encapsulation acts like a protective shield that prevents code and data from outside interference.

Inheritance

Inheritance defines a child’s class from the parent class. The main purpose of inheritance is code reusability. Inheritance is that  child class acquires or inherits state and behavior from the parent class

Polymorphism

Polymorphism is the ability to take many different forms. For example, child classes can have a same method as the parent class but can provide different method implementations by overriding the method.

Exit mobile version