ASM
ASM
Continuing the instance withinside the item segment above, we've got a phone
magnificence including 2 components:
Attributes: color, memory, working system…
Methods: calling, taking photos, texting, recording...
Objects of this magnificence can be: iPhone, Samsung, Oppo, Huawei...
Encapsulation
Encapsulation permits hiding records and the inner processing homes of the item. Other
items can't immediately have an effect on the facts internal and extrade the kingdom of
the item, however should undergo public strategies supplied via way of means of that
item.
This assets enables to boom the safety of the item and keep away from accidental facts
corruption.
Inheritance
This is a feature that is used quite a lot. Inheritance allows building a new class (Child
class), inheriting and reusing properties and methods based on the old class (Parent class)
that existed before.
Child classes inherit all the members of the Parent class and do not need to be redefined.
Subclasses can extend inherited components or add new ones.
Polymorphism
Polymorphism in OOP programming permits one-of-a-kind gadgets to carry out the
identical feature in one-of-a-kind ways.
Method Overloading : is a manner to overload strategies with the identical call however
special parameters
Method Overriding: This is a technique that overwrites the digital strategies of a sure
superclass (declared with the digital keyword).
To specific this approach want to apply 2 keywords: