Basic Concepts of OOPs

 

Objects:

An object is a real world element with some characteristics and behavior.

An object is instance of class.


Classes:

A class is a blueprint or prototype from which objects are created.

A class is description of a group of objects with similar attributes and behavior.


Abstraction:

The process of representing essential features without including the background details.

An abstract class defines an interface, but does not provide implementation details.


Encapsulation:

The process of combining data and function into a single unit.

Encapsulation keeps both data and functions safe from outside interface.


Inheritance:

The capacity of a class to inherit the properties of other class.

 A class that inherits the properties from other class is called derived or sub class.

A class that inherits its properties to sub class is called base class or super class.


Polymorphism:

It is ability for a function or data to be processed in more than one form.

Polymorphism many forms.

Types of Polymorphism are:

1.    Function overloading

2.    Operator overloading

Some function is used for multiple task in same program is known as function overloading.

When an operator behaves differently based on operands, it is called as operator overloading.


Binding:

Binding means linking of function call to the code of the function.

Types of bindings are

1.    Static binding

2.    Dynamic binding

The code is associated with a function call at the compilation time is called static binding.

Dynamic binding means associating code with function call during run time.


Message passing:

The processing of data in OO is carried out by sending messages to objects

Message passing involves specifying the name of objects, the name of the function, and information to be sent.

Comments