OOP/UML/Design Patterns Flashcards

1
Q

What are the 4 principles of OOP?

A

Abstraction, inheritance, encapsulation, and polymorphism

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

What does SOLID stand for?

A

Single Responsibility, Open-Closed Principle, Liskov Principle, Interface Segregation Principle, Dependency Inversion Principle

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

What is the single responsibility principle?

A

A class should only have one reason to change; different classes handle different tasks and problems

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

What is the Open-Closed Principle?

A

Classes should be open for extension but closed for modification

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

What is Liskov’s substitution principle?

A

You should be able to substitute a base type for a subtype

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

What is the Interface Segregation Principle?

A

Don’t put too much into an interface; split into separate interfaces

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

What is the Dependency Inversion principle?

A

High level modules should not depend on low level modules

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