Introduction to OPP Flashcards

1
Q

Four pillars of OPP

A

Abrstraction, Polymorphism, Encapsulation, Inheritance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

Abstraction

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Data stored inside the object’s fields is often referenced
as…

A

State

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

All the object’s methods define its

A

Behaviour

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Ability of an object to hide partsof its state and behaviours from other objects, exposing only limited interface to the rest of the program

A

Encapsulation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Why you can’t define field in the inteface

A

Inteface definies a contract of inteactions between objects

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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

A

Dependency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly