Encapsulation in Object Oriented Programming

Encapsulation is one of the main pillars of object oriented programming (OOPs) in which we bundles the attributes (data) and the functions (methods) that operate on that data within the class. It help in data hiding and abstraction , making our code more organized, secure & reusable. The following image may be helpful in understanding…

| |

What are Functions in Programming

In Programming, Functions are a piece of code that has a finite number of statements that  perform a specific task. The functions are designed to a reusable piece of code that can be invoked as many times as needed in the program. Functions in C/C++ has a main() function that is mandatory because the execution of program starts…

Classes and Objects in Object Oriented Programming.

Classes: In Object-Oriented Programming, a class is a blueprint or a template for creating objects. It is a user defined data types that holds its own data members(attributes) and member functions(methods) that can be accessed and used by creating an instance of that class. For example, if we map a class with real-world entity, let’s…