Design Principles Flashcards

1
Q

The main goal of this principle is to minimize the effect caused
by changes

A

Encapsulate What Varies (Identify the aspects of your application that vary and
separate them from what stays the same.)

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

What is encapsulation on method level?

A

You can extract the logic which will change into a separate
method, hiding it from the original method

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

What is encapsulation on class level?

A

You can extract the logic which will change into a separate
class and use this class

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

The main goal of this principle is to depend on abstraction rather than concrete classes

A

Program to an Interface, not anImplementation

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

The main goal of this principle is to reduce inheritance herarhy and allow to replace it in runtime

A

Favor Composition Over Inheritance

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