Design Patterns Flashcards

1
Q

What is singleton pattern?

A

Ensure only one instance of class is created. Unity used it for input manager. Implemented by private constructor and getInstance() method.

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

What is observer pattern?

A

A one to many dependency between objects so when one object changes state, others updated automatically. Observable has a list of observers.

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

What is MVC pattern?

A

Model (Data), View, Controller (operations performed on data).

Model does not depend on controller or view.

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