Blog

Internet Marketing Company

Posts Tagged ‘polymorphism’

Himani

FEATURES OF OOPS


There are various features Of OOPS which are as follows:

Class:-A class is a user defines data type. This is a template definition of the methods and variables for a particular kind of object. In further words, class is the blue print from which an individual objects is formed. An instance shows class’s attributes through some public or private method.They are the class methods.

Objects:-Basically an object are the variable of user defined data type “class”.OOP viewpoint, an object is nothing but an instance of a class that contains real values instead of variables. Communication or exchanging data between two objects.

Abstraction:This is a concept by which we can only access the necessary attributes of that class without knowing more about the other attributes or methods. In object-oriented software, complication is managed by using abstraction. Abstraction is a process that involves classifies the critical actions of an object and eliminates inappropriate and difficult details.

Encapsulation:-Encapsulation is a method for protecting data from unwanted access or alteration by packaging it in an object where it is only accessible through the object’s interface.In more general term Encapsulation is the wrapping up of a data into single unit called Class.Encapsulation is frequently referred to as information hiding.

Inheritance:-Creating new class from parent class. Inheritance is the ability to define a new class or object that inherits the behavior and its functionality of an existing class. The new class or object is called a child or subclass or derived class while the original class is called parent or base class.

Polymorphism:-It means one name many forms. Mainly there are two types of polymorphism.

1. Compile time polymorphism - It is achieved by overloading functions and operators
2. Run time polymorphism - It is accomplish by overriding virtual functions.