design patterns Flashcards

1
Q

What are three types of patterns in GOF catalog?

A
  1. creational
  2. structural
  3. behavioral
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

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

What are examples of creational patterns?

A

Singleton

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

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

What are characteristics of the singleton feature?

A
  1. enforces one and only one object of a singleton class
  2. has the singleton object globally accessible
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly