Professional Documents
Culture Documents
Object-Oriented Programming - PPT - Benjamin Babić
Object-Oriented Programming - PPT - Benjamin Babić
Benjamin Babić
2
O B J E C T- O R I E N T E D
PROGARMMING
P R O G R A M M I N G PA R A D I G M
PROPERTIES METHODS
Dimensions Addition
Model Division
Colour Exponentiation
Weight Square Root
Battery Type Trigonometric functions
3
PILLARS OF
OBJECT-
ORIENTED
PROGARMMING
CORE CONCEPT
4
ENCAPSULATIO
N
5
E N C A P S U L AT I O N
DEFINITION: bundling of data, along with the methods that operate on that data, into a single unit.
Information hiding
6
The best functions are those with no
parameters !
ROBERT C. MARTIN
ABSTRACTION
9
A B ST R AC T I O N
10
11
INHERITANCE
12
I N H E R I TA N C E PARENT CLASS
Example: Car
PROPERTIES METHODS
Color Start
Fuel Accelerate
Model Brake
Transmision Type Gear Shift
Number of doors/seats Directional signals
13
14
POLYMORPHISM
15
P O LY M O R P H I S M MOVE CLASS
- Runtime
- Compile Time
16
17
BENEFITS
E N C A P S U L AT I O N
Reduce complexity, limiting vulnerabilities, data protection
ABSTRACTION
Show essential attributes, isolate impact of changes
I N H E R I TA N C E
Eliminate redundant code, code reusability
P O LY M O R P H I S M
Enforcing simplicity, saving time, extandable codes, easily
maintained applications
18
QUESTIONS?
https://www.sumologic.com/glossary/encapsulation/
https://stackify.com/oop-concept-polymorphism/
https://en.wikipedia.org/wiki/Object-oriented_programming#Encapsulation
https://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming)
https://www.youtube.com/watch?v=1ONhXmQuWP8
https://en.wikipedia.org/wiki/Polymorphism_(computer_science)
https://en.wikipedia.org/wiki/Encapsulation_(computer_programming)
https://en.wikipedia.org/wiki/Abstraction_(computer_science)
https://docs.oracle.com/javase/tutorial/java/IandI/subclasses.html
https://www.nerd.vision/post/polymorphism-encapsulation-data-abstraction-and-inheritance-in-object-ori
ented-programming