Object Oriented Programming
Object Oriented Programming, or OOP, refers to the method of programming that invokes the use of classes to organize the data and structure of an application.
Object − Object is an instance of class. You define a class once and then make many objects and instances of same kind.
Class − This is a programmer-defined data type, which includes local data as well as local functions. You can think of a class as a template for making many objects of the same kind (or class).
Inheritance − When a class is defined by inheriting existing function of a parent class then it is called inheritance.
Parent class − A class that is inherited from by another class. This is also called a base class or super class.
Child Class − A class that inherits from another class. This is also called a subclass or derived class.
Polymorphism − This is an object oriented concept where same function can be used for different purposes. For example function name will remain same but it make take different number of arguments and can do different task.
Overloading − a type of polymorphism in which some or all of operators have different implementations depending on the types of their arguments. Similarly functions can also be overloaded with different implementation.
Data Abstraction − Any representation of data in which the implementation details are hidden.
Encapsulation − refers to a concept where we encapsulate all the data and member functions together to form an object.
Constructor − refers to a special type of function which will be called automatically whenever there is an object formation from a class.
Destructor − refers to a special type of function which will be called automatically whenever an object is deleted.
0 Comment(s)