Skip to content

Commit 026fd00

Browse files
author
Julien
committed
Better rephrase the problem statement.
1 parent 68aaa99 commit 026fd00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

chapters/design_patterns/adapter.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ chapter: Design patterns
55
---
66
## Problem
77

8-
Imagine you are traveling to a foreign country and once at your hotel room you realize your power cord is not compatible with the wall electric socket.
9-
Luckily you remember you brought with you a socket adapter.
10-
It will connect to the wall socket on one side and to your power cord on the other side, allowing for communication between them.
8+
Imagine you are traveling to a foreign country and once at your hotel room you realize your power cord socket is not compatible with the wall socket.
9+
Luckily, you remembered you've brought your power adapter with you.
10+
It will connect your power cord socket on one side and wall socket on the other side, allowing for communication between them.
1111

1212
The same situation may arise in code, when 2 (or more) instances (of classes, modules, etc.) want to talk to each other, but whose communication protocol (e.i. the language they use to communicate) is different from each other.
1313
In such a situation, the [Adapter Pattern](//en.wikipedia.org/wiki/Adapter_pattern) comes in handy. It will do the translation, from one side to the other.

0 commit comments

Comments
 (0)