Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
design_pattern:adapter_pattern [2021/02/07 03:24] – [Adapter Pattern] ledyxdesign_pattern:adapter_pattern [2024/02/05 13:16] (current) – [Target, Adapter] ledyx
Line 89: Line 89:
  * 필요한, 변환될 것. Target  * 필요한, 변환될 것. Target
  */  */
-public abstract class NewVerAPI { +public interface NewVerAPI { 
- public abstract void printMessage(); + void printMessage(); 
- public abstract void printVersion();+ void printVersion();
 } }
 </sxh> </sxh>
Line 99: Line 99:
  * 필요한, 변환될 것의 구현체. Adapter  * 필요한, 변환될 것의 구현체. Adapter
  */  */
-public class NewVerAPIImpl extends NewVerAPI {+public class NewVerAPIImpl implements NewVerAPI {
  private OldVerAPI oldVerAPI;  private OldVerAPI oldVerAPI;
   
design_pattern/adapter_pattern.1612668293.txt.gz · Last modified: 2021/02/07 03:24 by ledyx