Step 1: Encapsulation.
OOP allows the bundling of data (attributes) and methods (functions) into a single unit known as a class. This helps in protecting the data from unauthorized access and modification, ensuring that only appropriate methods can manipulate the data.
Step 2: Inheritance.
OOP promotes reusability through inheritance, where a new class can inherit properties and methods from an existing class. This reduces redundancy and allows code to be reused, which makes the codebase more maintainable.