Skip to content

Commit

Permalink
chore: Fix typos in SOLID.md
Browse files Browse the repository at this point in the history
Reigster -> Register
์—ฃ -> ์—์„œ
  • Loading branch information
bezzang-dev authored Nov 6, 2023
1 parent ed8c981 commit ac59ab7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Design Pattern/SOLID.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Register ํด๋ž˜์Šค๊ฐ€ Student ํด๋ž˜์Šค์— dependency๋ฅผ ๊ฐ€์ง€๊ณ  ์žˆ๋Š” ๋ชจ์Šต

![](https://images.velog.io/images/whow1101/post/c7db57cb-5579-45eb-b999-ffc2f57b2061/overview_pattern_2.PNG)

ํ•˜์ง€๋งŒ Register ํด๋ž˜์Šค๋Š” ์–ด๋– ํ•œ ๋ณ€๊ฒฝ๋„ ์ผ์–ด๋‚˜์•ผํ•˜์ง€ ์•Š์ง€๋งŒ Student ํด๋ž˜์Šค๊ฐ€ ๋ฐ”๋€Œ์–ด์„œ Register ํด๋ž˜์Šค๊ฐ€ ์˜ํ–ฅ์„ ๋ฐ›๋Š”๋‹ค. ์ •๋ ฌ์„ ์œ„ํ•œ ๋ณ€๊ฒฝ์ด ๊ด€๋ จ์—†๋Š” Reigster ํด๋ž˜์Šค์— ์˜ํ–ฅ์„ ๋ผ์ณค๊ธฐ ๋•Œ๋ฌธ์— SRP๋ฅผ ์œ„๋ฐ˜ํ•œ๋‹ค.
ํ•˜์ง€๋งŒ Register ํด๋ž˜์Šค๋Š” ์–ด๋– ํ•œ ๋ณ€๊ฒฝ๋„ ์ผ์–ด๋‚˜์•ผํ•˜์ง€ ์•Š์ง€๋งŒ Student ํด๋ž˜์Šค๊ฐ€ ๋ฐ”๋€Œ์–ด์„œ Register ํด๋ž˜์Šค๊ฐ€ ์˜ํ–ฅ์„ ๋ฐ›๋Š”๋‹ค. ์ •๋ ฌ์„ ์œ„ํ•œ ๋ณ€๊ฒฝ์ด ๊ด€๋ จ์—†๋Š” Register ํด๋ž˜์Šค์— ์˜ํ–ฅ์„ ๋ผ์ณค๊ธฐ ๋•Œ๋ฌธ์— SRP๋ฅผ ์œ„๋ฐ˜ํ•œ๋‹ค.

![](https://images.velog.io/images/whow1101/post/ddd405f3-ad24-40ac-bf58-b7d9629006f8/overview_pattern_3.PNG)

Expand Down Expand Up @@ -107,7 +107,7 @@ dataValue = date.getDate(); // throws IllegalArgumentException

![](https://images.velog.io/images/whow1101/post/e3fcc38c-4cd1-4bcf-b0f9-108787d30a1b/overview_pattern_7.PNG)

์œ„์˜ ์˜ˆ์ œ์—‡ ๋งŒ์•ฝ List์˜ Implemenation์„ ์žฌ์‚ฌ์šฉํ•˜๊ฒŒ ๋œ๋‹ค๋ฉด inheritance๋ณด๋‹ค object composition์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์„ ์ถ”์ฒœํ•œ๋‹ค.
์œ„์˜ ์˜ˆ์ œ์—์„œ ๋งŒ์•ฝ List์˜ Implemenation์„ ์žฌ์‚ฌ์šฉํ•˜๊ฒŒ ๋œ๋‹ค๋ฉด inheritance๋ณด๋‹ค object composition์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒƒ์„ ์ถ”์ฒœํ•œ๋‹ค.

์œ„์—์„œ Queue ํด๋ž˜์Šค๊ฐ€ List ํด๋ž˜์Šค๋ฅผ inheritance ํ•œ๋‹ค๋ฉด LSP๋ฅผ ์œ„๋ฐ˜ํ•˜๊ฒŒ ๋œ๋‹ค.

Expand Down

0 comments on commit ac59ab7

Please sign in to comment.