Lesson 7 Flashcards

1
Q

is one of the simplest design
patterns: it involves only one class which is responsible to
make sure there is no more than one instance; it does it
by instantiating itself and in the same time it provides a
global point of access to that instance

A

The singleton pattern

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

are used for centralized management
of internal or external resources and they provide a
global point of access to themselves.

A

singletons

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

Ensure that only one instance of a class is created and
Provide a global access point to the object.

should be used when we must
ensure that only one instance of a class is created
and when the instance must be available through
all the code.

A special care should be taken in multi-threading
environments when multiple threads must access
the same resources through the same singleton
object.

A

SINGLETON

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

is probably the most used
design pattern in modern programming languages like
Java and C#. It comes in different variants and
implementations.

Defines an interface for creating objects, but let
subclasses to decide which class to instantiate and Refers
to the newly created object through a common
interface.

It creates objects without exposing the instantiation logic
to the client.

efers to the newly created object
through a common interface

A

FACTORY METHOD

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

a super-factory which
creates other factories (Factory of factories)

A

ABSTRACT FACTORY

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

A pattern that provides an interface for creating families of
related or dependent objects without specifying their concrete
classes.

A

ABSTRACT FACTORY

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