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.
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.
3
Q
What is MVC pattern?
A
Model (Data), View, Controller (operations performed on data).
Model does not depend on controller or view.