0% found this document useful (0 votes)
5 views

Object Oriented Programming OOP

Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Object Oriented Programming OOP

Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Object-Oriented Programming (OOP)

Object-Oriented Programming (OOP) is a programming paradigm based on the


concept of "objects", which are instances of classes. OOP organizes software design
around data, or objects, rather than functions and logic.

Key Concepts in OOP:


- Classes and Objects: A class is a blueprint for creating objects, and an
object is an instance of a class.
- Inheritance: A way to define a new class based on an existing class, allowing
for reuse of code.
- Encapsulation: The bundling of data and methods that operate on the data into
a single unit, or class.
- Polymorphism: The ability to treat objects of different classes as if they
are instances of the same class through a common interface.

Example:
- A class `Car` could be defined with attributes like `color`, `make`, and
`model`. Objects of this class could represent specific cars, such as a red Toyota
or a blue Honda.

You might also like