Search

Object Oriented Programming (OOP)

OOP (Object Oriented Programming)

1.
Abstraction
2.
Encapsulation
3.
Inheritance
4.
Polymorphism

Abstraction

•
constructing a solution from fundamental parts

Encapsulation

•
dependency of the object
•
Bundling relevant property and method into a class
•
property = data
•
operation = method

Inheritance

•
a way to create a new class while using the details of an existing class without modifying it
•
data protection
•
changing the base class is called override
•
2-3 layers are common but not recommend to make it deeper

Polymorphism

•
is the ability of an object to take on many forms
•
Method overriding - where you are defining in the child class a method with the same name of a method in the parent class

Reference