Introduction to OPP Flashcards
Four pillars of OPP
Abrstraction, Polymorphism, Encapsulation, Inheritance
Real-world object or phenomenon,
limited to a specific context, which represents all details rele-
vant to this context with high accuracy and omits all the rest
Abstraction
Data stored inside the object’s fields is often referenced
as…
State
All the object’s methods define its
Behaviour
Ability of an object to hide partsof its state and behaviours from other objects, exposing only limited interface to the rest of the program
Encapsulation
Why you can’t define field in the inteface
Inteface definies a contract of inteactions between objects
Weaker variant of association that usually implies that there’s no permanent link between objects.
Dependency typically (but not always) implies that an object
accepts another object as a method parameter, instantiates, or
uses another object
Dependency