设计模式---适配器模式
来源:互联网 发布:一个淘宝号刷多少会查 编辑:程序博客网 时间:2024/04/27 17:50
01 /**
02 * @author Rollen-Holt 设计模式之 適配器模式
03 */
04
05 interface window{
06 void open();
07 void close();
08 void activated();
09 void iconified();
10 }
11
12 abstract class WindowAdapter{
13 public void open(){
14
15 }
16 public void close(){
17
18 }
19 public void activated(){
20
21 }
22 public void iconified(){
23
24 }
25 }
26
27 class AdapterDemo extends WindowAdapter{
28 public void open(){
29 System.out.println("打开窗口");
30 }
31 public void close(){
32 System.out.println("关闭窗口");
33 }
34 }
35
36 class hello{
37 public static void main(String[] a){
38 AdapterDemo a1=new AdapterDemo();
39 a1.open();
40 a1.close();
41 }
42 }
02 * @author Rollen-Holt 设计模式之 適配器模式
03 */
04
05 interface window{
06 void open();
07 void close();
08 void activated();
09 void iconified();
10 }
11
12 abstract class WindowAdapter{
13 public void open(){
14
15 }
16 public void close(){
17
18 }
19 public void activated(){
20
21 }
22 public void iconified(){
23
24 }
25 }
26
27 class AdapterDemo extends WindowAdapter{
28 public void open(){
29 System.out.println("打开窗口");
30 }
31 public void close(){
32 System.out.println("关闭窗口");
33 }
34 }
35
36 class hello{
37 public static void main(String[] a){
38 AdapterDemo a1=new AdapterDemo();
39 a1.open();
40 a1.close();
41 }
42 }
- 设计模式:适配器模式
- 设计模式------适配器模式
- 设计模式:适配器模式
- 设计模式---适配器模式
- 设计模式 适配器模式
- 设计模式 - 适配器模式
- 设计模式--适配器模式
- 设计模式-适配器模式
- 设计模式------适配器模式
- 设计模式---适配器模式
- 设计模式- 适配器模式
- 设计模式 - 适配器模式
- 设计模式:适配器模式
- 适配器模式--设计模式
- 设计模式 - 适配器模式
- 设计模式-适配器模式
- 设计模式---适配器模式
- 设计模式-适配器模式
- Take sofa
- Extension Object Pattern
- 关于java的学习方法的一点感想
- 杭电 4006 亚洲区预赛大连赛区
- 自定义消息实现进程间的通信
- 设计模式---适配器模式
- 设计模式---代理模式
- 设计模式---单例模式
- java--数据采集系统
- 设计模式---工厂模式
- 删除两个升序正数组中重复元素的C程序实现代码
- java中的多线程实例
- java中的泛型的一些常见例子
- 关于windows程序相关基础技术的一点小结(2.windows socket 篇)