Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- 아마존웹서비스
- playbook
- Google Cloud Platrofm
- Kubernetes Engine
- Google Cloud
- AWS
- GKE
- ansible
- Cloud SQL
- AWS Database
- Cloud Storage
- Solution Architect
- kubernetes
- Google Cloud Platform
- Cloud Bigtable
- container
- AWS Solution Architect
- VPC
- Compute Engine
- AWS 자격증
- Cloud Spanner
- 리버스 프록시
- gcp
- Cloud Datastore
- Reverse Proxy
- Solution Architect Certificate
- 앤서블
- Amazon Web Service
- AWS Certificate
- Google Cloud Platorm
Archives
- Today
- Total
sungwony
[디자인패턴] Template method 패턴 본문
Template Method 패턴
- 템플릿(형판)의 기능을 가진 패턴
- 템플릿에 해당하는 메소드가 정의되어 있고, 그 메소드의 정의 안에는 추상 메소드가 사용된다.
- 상위 클래스의 관점에서 추상 메소드를 어떻게 호출하는지 알 수 있지만 어떤 처리가 이뤄지는지는 알 수 없다.
- 하위 클래스에서 추상 메소드를 구현하고 상위 클래스의 템플릿에 의해 호출이 이루어진다.
이름 |
해설 |
AbstractDisplay |
메소드 display만 구현되고 있는 추상 클래스 |
CharDisplay |
메소드 open, print, close를 구현하고 있는 클래스 |
StringDisplay |
메소드 open, print, close를 구현하고 있는 클래스 |
Main |
동작 테스트용 클래스 |
'development > 디자인패턴' 카테고리의 다른 글
[디자인 패턴] Visitor 패턴 (0) | 2018.08.13 |
---|---|
[디자인 패턴] Decorator 패턴 (0) | 2018.08.10 |
[디자인패턴] 디자인패턴 입문 - 디자인패턴 (0) | 2018.07.18 |
[디자인패턴]디자인 패턴 인덱스 (0) | 2018.07.17 |
[디자인패턴] Adapter 패턴 (0) | 2018.07.11 |