Two Factory Patterns Flashcards

(9 cards)

1
Q

Factory Class

A

A class that builds and returns object(s).

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

Product

A

The object being created.

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

Abstract Product

A

A base class/interface for all products.

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

Concrete Product

A

The actual implementations of the product.

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

Client (Factory Pattern)

A

Calls the code that uses the factory to get objects.

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

Abstract Creator

A

The superclass with the factory method.

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

Concrete Creator

A

Subclass that implements the factory method.

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

Simple Factory Pattern

A
  • A class that creates different products from the same family.
  • Not a formal design pattern (technically), but widely used.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Factory Method Pattern

A
  • Each subclass (creator) defines how to create an object.
  • Supports multiple families of products.
  • A formal design pattern.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly