Test1_Chapter31 Flashcards

(11 cards)

1
Q

Adapter Pattern

A

It is about making two interfaces that are not compatible, compatible.

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

Facade Pattern

A

It is about taking a bunch of complex interactions and creating a single interface that you can use instead of dealing with all those complex objects and complex interactions.

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

Proxy Pattern

A

It is placed between the client and something that you want to call. So instead of calling
A method directly, you call the proxy who calls that method.

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

Bridge Pattern

A

It works with separate hierarchies that can be expanded independently
with one hierarchy containing a reference to another

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

Decorator Pattern

A

It is a way of adding behaviour to a class without changing the class.

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

Client

A

This module contains the existing business logic of the program

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

IAdapter

A

This module describes a protocol that other modules must follow to be able to collaborate with the
client code.

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

Product

A

This module provides a service. The client cannot use it directly because it has an incompatible
interface

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

Adapter

A

This module can work with both the client and the service: it implements the client interface,
while wrapping the service object.

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

Adapter Pattern Statements

A

-You can separate the interface or data conversion code from the primary business logic of the program

-You need to introduce a set of new interfaces and classes.

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

Bridge Pattern Statements

A
  • You can create platform-independent classes and apps.
  • The client code works with high-level abstractions. It is not exposed to the platform details.
  • You can introduce new abstractions and implementations independently from each other.
  • You can focus on high-level logic in the abstraction and on platform details in the
    implementation.
  • Since we can change the reference to the implementer in the abstraction, we are able to change the
    implementer at run-time
  • We apply the pattern to a highly cohesive class.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly