OO Principles Flashcards

1
Q

Interfaces

A

Code to an interface rather than to an implementation.

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

Changing a class

A

Each class in your application should have only one reason to change.

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

What are classes all about anyway?

A

Classes are about behavior and functionality.

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

The Open-Closed Principle

A

Classes should be open for extension, but closed for modification (OCP).

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

The DRY principle

A

Avoid duplicate code by abstracting out things that are common and placing them in a single location.

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

The SRP

A

Every object in your system should have a single responsibility, and all the object’s services should be focused on carrying out that single responsibility.

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

The LSP

A

Subclasses should be suitable for their base classes.

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

Encapsulation

A

Encapsulate what varies.

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