0% found this document useful (0 votes)
8 views2 pages

Object Oriented Prog.

Object-oriented programming (OOP) is defined by four key properties: encapsulation, abstraction, inheritance, and polymorphism, which help organize code into reusable and maintainable modules. Encapsulation protects an object's internal state, abstraction simplifies interactions by hiding complex details, inheritance promotes code reuse through hierarchical structures, and polymorphism allows different classes to be treated as a common type. Together, these principles enhance code modularity and maintainability.

Uploaded by

saikat ganguly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Object Oriented Prog.

Object-oriented programming (OOP) is defined by four key properties: encapsulation, abstraction, inheritance, and polymorphism, which help organize code into reusable and maintainable modules. Encapsulation protects an object's internal state, abstraction simplifies interactions by hiding complex details, inheritance promotes code reuse through hierarchical structures, and polymorphism allows different classes to be treated as a common type. Together, these principles enhance code modularity and maintainability.

Uploaded by

saikat ganguly
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Object-oriented programming (OOP) is characterized by four key properties: encapsulation,

abstraction, inheritance, and polymorphism. These principles help organize code into reusable
and maintainable modules by treating data and behavior as objects.
Here's a breakdown of each property:

Encapsulation:
Encapsulation bundles the data (attributes or properties) and methods (functions) that operate on that data within a single unit, an object, or a class. This protects
the internal state of the object and controls access to it, enhancing data security and integrity.


Abstraction:
Abstraction focuses on exposing only the essential features of an object while hiding the complex implementation details. This simplifies interactions with objects
and allows users to focus on what an object does rather than how it does it.

 Inheritance:
Inheritance allows new classes to inherit properties and behaviors from existing classes, creating a hierarchical structure. This promotes code reuse and reduces
redundancy by allowing developers to build upon existing code.


Polymorphism:
Polymorphism allows objects of different classes to be treated as objects of a common type. This enables flexible and dynamic code where a single function or
method can be used with different objects, adapting its behavior based on the object's type.
These four properties, when used effectively, lead to modular, reusable, and maintainable code.
This video explains the fundamental concepts of object-oriented programming:

You might also like