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 | 31 |
Tags
- java #Design Pattern #Prototype #디자인패턴 #프로토타입
- uuid
- Default activity not found #build #에러
- java #디자인패턴 #Design Pattern #퍼사드 #Percade
- Flutter
- eclipse #pom.xml #
- java #spring #dbcp #connection pool #자바 #스프링
- flyweight pattern
- 애드몹
- AdMob
- java # 설계 #디자인패턴 # gof # 클래스 구조
- 플러터
- java #디자인패턴 #gof #추상 팩토리 패턴 #abstract
- java #spring # spring boot # 싱글톤 #prototype
- mybatis
- 팩토리 메서트 # 패턴 #factory method # pattern
- java #자바 #디자인패턴 #싱글톤 #Singleton
- tm4e
- timescale
- 데코레이터 패턴
- Builder Pattern #빌더 패턴 #디자인패턴 # Design Pattern #생성 패턴
- 클래스 다이어그램 #UML
- 아답터 패턴
- 플라이웨이 패턴
- Adapter Patten
- 브릿지 패턴
- Spring #Bean #객체생성시점
- Postgre
- Restful api #Spring boot #스프링부트
- Bridge Patten
Archives
- Today
- Total
목록java #Design Pattern #Prototype #디자인패턴 #프로토타입 (1)
개발자의 무지개

개념 프로토타입 패턴은 생성 패턴의 한 종류로, 서브클래스의 객체를 복사할 경우 의존관계를 가지지 않고도 객체를 복사할 수 있게 한다. 서브클래스는 부모인 Prototype클래스를 상속받아 clone 을 구현하여, Prototype 타입의 객체에게 복제 기능을 제공한다. 상황 이어폰 기본 속성은 가격과 색상이 있고, 유선이어폰은 케이블길이, 무선이어폰은 배터리용량 속성을 각 각 가지고 있다. 유선과 무선 이어폰에 대한 제품설명을 출력하는 프로그램을 만들어보자. public abstract class Earphone { protected int price; protected String color; public Earphone(int price, String color) { this.price = pric..
소프트웨어 아키텍처/디자인패턴
2022. 7. 9. 12:17