OOP
OOP
PROGRAMMING
OOP
ADVANTAGES OF OOP
STRUCTURE OF OOP
MAIN PRINCIPLES OF
OOP
BENEFITS OF OOP
Introduction
OBJECT- MAIN PRINCIPLES BENEFITS OF OOP
OOP
ORIENTED OF OOP
• Modularity
PROGRAMMING • Encapsulation
• Reusability
• Abstraction
• Productivity
STRUCTURE OF • Inheritance
OOP • Easily upgradable
• Polymorphism and scalable
• Classes
• Objects • Interface
descriptions
• Methods
• Security
• Attributes
• Flexibility
OBJECT ORIENTED PROGRAMMING
OOP is a computer programing model that organizes software design around data, or
objects, rather than functions and logic.
The popular object-oriented languages are Java, C#, PHP, Python, and C++.
What are examples of OOP languages?
Simula is considered the first object-oriented programming language.
Popular PURE OOP languages include Ruby, Scala, JADE and Emerald.
Programming languages designed PRIMARILY for OOP include Java, Python and C++.
Other programming languages that PAIR with OOP include VB.NET, PHP and JavaScript.
STRUCTURE OF OOP
• CLASSES
• OBJECTS
• METHODS
• ATTRIBUTES
STRUCTURE OF OOP
The structure, or building blocks, of OOP include the following:
Classes are user-defined data types that act as the blueprint for individual objects,
attributes and methods.
We have DOG class example, attributes include NAME and BIRTHDAY, while methods
include BARK.
STRUCTURE OF OOP
Objects are instances of a class created with specifically defined data.
Objects can correspond to real-world objects or an abstract entity. When class is
defined initially, the description is the only object that is defined.
Objects are instances of a class created with a specific data.
Any entity that has state and behavior is known as an object.
We have DOG class example, BROWNY is an instance of the DOG class. We have
barking and eating as the behavior of BROWNY. BROWN and LABRADOR
RETRIEVER is the attribute of Browny.
MAIN PRINCIPLES
OF OOP
ENCAPSULATION
− This principle states that all important information is contained inside an object and only select
information is exposed.
− The implementation and state of each object are privately held inside a defined class.
− Other objects do not have access to this class or the authority to make changes.
− This characteristic of data hiding provides greater program security and avoids unintended data
corruption.
− Binding (or wrapping) code and data together into a single unit are known as encapsulation. For
example, a capsule, it is wrapped with different medicines.
ABSTRACTION
− Objects only reveal internal mechanisms that are relevant for the use of other
objects, hiding any unnecessary implementation code.
− This concept can help developers more easily make additional changes or additions
over time.
− This property of OOP forces a more thorough data analysis, reduces development
time and ensures a higher level of accuracy.
− When one object acquires all the properties and behaviors of a parent object, it is
known as inheritance.
POLYMORPHISM
− Objects are designed to share behaviors and they can take on more than one form.
− The program will determine which meaning or usage is necessary for each execution of that object from a
parent class, reducing the need to duplicate code.
− A child class is then created, which extends the functionality of the parent class.
− Polymorphism allows different types of objects to pass through the same interface.
− For example, to convince the customer differently, to draw something, for example, shape, triangle,
rectangle, etc.
− Another example can be to speak something; for example, a cat speaks meow, dog barks woof, etc.
BENEFITS OF OOP
• Modularity
• Interface
• Reusability descriptions
• Productivity • Security
• Easily • Flexibility
upgradable
and scalable
MODULARITY
− Encapsulation enables objects to be self-contained,
making troubleshooting and collaborative
development easier.
− Modularity is a concept in object-oriented
BENEFITS
programming that allows us to divide a complex
problem into smaller and manageable modules
OF OOP
REUSABILITY
− Code can be reused through inheritance, meaning
a team does not have to write the same code
multiple times.
− Reusability in OOP is the concept of using existing
BENEFITS
code to create new classes or objects.
− Reusability reduces redundancy and repetition in
code and facilitates the quick development and
testing of programs.
OF OOP
− One way to achieve reusability in OOP is through
inheritance, which allows a new class to inherit
the properties and methods of an existing class.
PRODUCTIVITY
− Programmers can construct new programs
quicker through the use of multiple libraries and
reusable code.
BENEFITS
OF OOP
EASILY UPGRADABLE AND ACCESSIBLE
BENEFITS
OF OOP
INTERFACE DESCRIPTIONS
− Descriptions of external systems are simple, due
to message passing techniques that are used for
objects communication.
BENEFITS
OF OOP
SECURITY
− Using encapsulation and abstraction, complex
code is hidden, software maintenance is easier
and internet protocols are protected.
BENEFITS
OF OOP
FLEXIBILITY
− Polymorphism enables a single function to adapt to
the class it is placed in.
− Different objects can also pass through the same
interface.
BENEFITS
OF OOP
REFERENCES
https://www.javatpoint.com/java-oops-concepts
https://www.techtarget.com/searchapparchitecture/
definition/object-oriented-programming-OOP
THANK YOU!