design patterns Flashcards
1
Q
What are three types of patterns in GOF catalog?
A
- creational
- structural
- behavioral
2
Q
What are creational patterns?
A
Creational patterns tackle how you handle creating new objects.
Clone existing objects if the new object is similar to an existing one.
3
Q
What are examples of creational patterns?
A
Singleton
4
Q
What are structural patterns?
A
Structural patterns describes how objects are connected to each other.
Like which ingredients should be paired together and how much dependence between them.
5
Q
What are behavioral patterns?
A
Behavioral patterns focus on how objects distribute work.
They describe how each object does a single cohesive function.
6
Q
What are characteristics of the singleton feature?
A
- enforces one and only one object of a singleton class
- has the singleton object globally accessible
7
Q
A