Object Oriented Programming
Object Oriented Programming
By Group 8
Bikrant Lekhak
Bidith Aryal
Binamra Bhandari
Binayak Chaudhary
Binod Chapagain
What is an Object?
Real-World Entity Data and Behavior
Unique Identity
A class is a blueprint or From a class, you can create Classes provide a way to
template that defines the multiple objects, each with their encapsulate data and methods,
properties and methods own unique data but sharing hiding the implementation
common to all objects of that the same structure and details and exposing only the
class. behavior. necessary functionality.
Encapsulation: Hiding
Implementation Details
1 Data Hiding
2 Abstraction
3 Modularity
3 Code Reuse
Simplification
Clarity
Flexibility
Inheritance allows classes to inherit properties and methods from parent classes, promoting code reuse and reducing duplication.
Specialization
Subclasses can extend and specialize the functionality of their parent classes, creating a hierarchical relationship.
Polymorphism
Inheritance enables polymorphism, where objects of a subclass can be used in place of their parent class.
Real-world examples of OOP
Cars Each car is an object with
properties (color, make,
model) and methods (start,
accelerate, brake).