0% found this document useful (0 votes)
3 views3 pages

10. Object-Oriented Programming

Object-Oriented Programming (OOP) is a programming paradigm centered around 'objects' that encapsulate data and methods. Key characteristics include encapsulation, abstraction, inheritance, polymorphism, classes and objects, and message passing, which promote code reusability and modular design. These principles allow for higher-level interactions with complex systems while maintaining a controlled interface.

Uploaded by

DENIS RONO
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)
3 views3 pages

10. Object-Oriented Programming

Object-Oriented Programming (OOP) is a programming paradigm centered around 'objects' that encapsulate data and methods. Key characteristics include encapsulation, abstraction, inheritance, polymorphism, classes and objects, and message passing, which promote code reusability and modular design. These principles allow for higher-level interactions with complex systems while maintaining a controlled interface.

Uploaded by

DENIS RONO
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
You are on page 1/ 3

Object-Oriented Programming (OOP) is a programming paradigm based on the concept of "objects",

which can contain data and code to manipulate that data. The main characteristics of OOP are:

1. Encapsulation:

Bundling data (attributes) and methods (functions) that operate on the data into a single unit or class.

Helps in hiding the internal state of the object and only exposing a controlled interface.

2. Abstraction:

Hiding complex implementation details and showing only essential features.

Allows the user to interact with objects at a higher level without needing to understand the underlying
code.

3. Inheritance:

Allows a class (child or derived class) to inherit properties and methods from another class (parent or
base class).

Promotes code reusability and hierarchical classification.


4. Polymorphism:

Allows objects to be treated as instances of their parent class rather than their actual class.

Includes method overloading (same method name with different parameters) and method overriding
(redefining a method in the derived class).

5. Class and Object:

A class is a blueprint for creating objects.

An object is an instance of a class.

6. Message Passing:

Objects communicate with each other using messages (typically method calls).

Promotes modular and decoupled system design.


Would you like a real-world example of these concepts?

You might also like