
ํฉํ ๋ฆฌ ๋ฉ์๋ ํจํด์ ๊ฐ๋ฐ์๋ค์๊ฒ ์ธ๊ธฐ์๋ ๋์์ธ ํจํด์ด๋ค. ๊ฐ๋จํ '๋ฒํผ' ์์ ๋ฅผ ํตํด ์ค์ต์ ํด๋ณด์๋ค. 1. ์ปดํฌ๋ํธ ์์ฑ์ปดํฌ๋ํธ ์ฉ ์ถ์ ํด๋์ค๋ฅผ ์์ฑํ๊ณ , ๊ทธ ์ถ์ํด๋์ค๋ฅผ ์์๋ฐ๋ ๋ฒํผ/์ค์์น/๋๋กญ๋ค์ด ์ปดํฌ๋ํธ๋ฅผ ์์ฑํ๋ค.package designPattern.factoryMethod;/** * ์ปดํฌ๋ํธ ์ถ์ ํด๋์ค (๋ฒํผ, ์ค์์น, ๋๋กญ๋ค์ด ๋ฑ...) */abstract class UIComponent { protected abstract String componentName(); // 1. ์ด๋ฆ public UIComponent() { // 2. ๋์ System.out.println(this.componentName() + " ์์ฑ!"); }}package de..