Skip to content

Commit 78e1b56

Browse files
committed
Update README.md
1 parent 0794f54 commit 78e1b56

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
11
# ☕ Java Design Patterns
22

3-
## Composite
3+
## Composite
4+
5+
Composite lets you compose objects into tree structures and then work with these structures as if they were individual objects.
6+
7+
For example, lets say you have an order, and thar order can be composed by many packages that contains boxes with products.
8+
9+
Composite can solve this by making an abstraction of package, and every item and box inherits from it. All the boxes can have different packages inside it, and the item is the final content.

0 commit comments

Comments
 (0)