Design Priciples Flashcards

1
Q

S (in SOLID)

A

-Single Responsibility-

Class has ownership over only one thing, and everything needed to manage that is in the class

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

O (in SOLID)

A

-Open/Closed Principle-

Open for extension, closed for modification. If you want to make a class that overrides a parent in some way that’s ok, but you shouldn’t be able to fundamentally change that parent on the fly.

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

L (in SOLID)

A

-Liskov Substitution-

If S is a subtype of T, then an object of S should be able to fill in everywhere T fills. If you’re extending a class it has to do everything the parent could do.

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

Recursion

A

Instructions that reference the “same” procedure as part of it’s own procedure.

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

I (in SOLID)

A

-Interface segmentation-

Don’t depend on interfaces they don’t use. You’re better off using many small interface than one big one,where not everything is used.

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

D (in SOLID)

A

-Dependency Inversion-

High level abstractions should not depend on low level implementations.

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

Encapsulation

A

The data/internals of a class are hidden to others

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

Abstraction

A

Develop for function not for implementation. Decompose into smaller components.

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

Inheritance

A

Child classes take on properties/data from their parents

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

Polymorphism

A

Two related classes can implement the same function, but have different results/implementations

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