Basics of object oriented programming:

Basics of object oriented programming:

C++ basics :

Object-oriented programming referred to the language that uses objects in programming.

Oops, aim to implement real-world entities like inheritance, hiding, polymorphism etc... The main name of Oops is to bind the data members and the member function so no other parts of the code can access these data except that function.

✪ Class :

✤ A class is a user-defined data type. It consists of data member and member functions. Which can be accessed by creating an instance of the class.

✤ The class represents similar properties.

Object:

✤ It is a basic unit of OOPs and represents real-life entities.

✤ An Object is an instance of the class.

✤ When a class is defined no memory is allocated but when it is initialized memory is allocated an object has an identity state and behavior.

✪ Data abstraction:

✤ Data abstractions referred to providing only essential information about the data to the outside world hiding the background details.
✤ Let us consider one example: a car accelerator is used to stop the car but we don't know how its mechanism how works this property is known as abstraction.

✪ Encapsulation:

Encapsulation binds the data member and member function in a single unit example class.

✪ Inheritance:

✤ Inheritance is the ability to create a new class from an existing class called inheritance.

✪ Polymorphism:

Polymorphism = many forms

polymorphism occurs when there is a hierarchy of classes and they are related by inheritance.

✹ Difference between object-oriented programming and procedural programming:

🔯🔯🔯HAPPY LEARNING 🔯🔯🔯