Some Important Concept of OOP(Object Oriented Programming)


Object Oriented Programming: OOP is a programming paradigm/pattern using objects & data structures consisting of data fields & methods together with their interactions to design applications & computer programs.

Static allocation: Static memory allocation refers to the process of allocating
memory at compile-time before the associated program is executed.

Dynamic allocation: Dynamic memory allocation refers to the process of allocating memory during the associated program is executed.

FLOPS- Floating Point Operation Per Second.

Why int is used for memory allocation? :
       The opetation of int is done very fast. So int is used in most cases.

Abstraction: In OOP theory, abstraction involves the facility to define objects that represent abstract "actors" that can perform work, report on and change their state, and "communicate" with other objects in the system.

Encapsulation: The term encapsulation refers to the hiding of state details, but extending the concept of data type from earlier programming languages to associate behavior most strongly with the data, and standardizing the way that different data types interact, is the beginning of abstraction.

Inheritance: In object-oriented programming (OOP), inheritance is a way to compartmentalize and reuse code by creating collections of attributes and behaviors called objects which can be based on previously created objects. In classical inheritance where objects are defined by classes, classes can inherit other classes.

Polymorphism: “Poly” means Many & “morphism” means Forms. Polymorphosm is the ability to create a variable, a function, or an object that has more than one form.

Different types of access modifier:---
Public: public is the most common access specifier in c++. It can be access from anywhere, that means there is no restriction on accessibility. The scope of accessibility is inside class as well as outside. Example: when a base class is specified as public. Then the base class can be seen and accessed by anyone.

Private: The scope of accessibility is limited only inside the classes in which they are declared. The private members can not be accessed outside the class. Example: When a base class is specified as private, the base class can only be seen and accessed by the class itself.

Protected: The scope of accessibility is limited within the class and the class inherited from this class means subclass. Example: When a base class is specified as protected, the base class can only be seen and accessed by the subclasses.

        Thanks for being with us. Keep visiting for more updates. :)

Popular Posts