打字猴:1.700464191e+09
1700464191 //丈夫只处理妻子的请求
1700464192
1700464193 public Husband(){
1700464194
1700464195 super(Handler.HUSBAND_LEVEL_REQUEST);
1700464196
1700464197 }
1700464198
1700464199 //丈夫请示的答复
1700464200
1700464201 protected void response(IWomen women){
1700464202
1700464203 System.out.println(”––—妻子向丈夫请示––-“);
1700464204
1700464205 System.out.println(women.getRequest());
1700464206
1700464207 System.out.println(“丈夫的答复是:同意\n”);
1700464208
1700464209 }
1700464210
1700464211 }
1700464212
1700464213 儿子类只能处理等级为3的请示,如代码清单16-11所示。
1700464214
1700464215 代码清单16-11 儿子类
1700464216
1700464217 public class Son extends Handler{
1700464218
1700464219 //儿子只处理母亲的请求
1700464220
1700464221 public Son(){
1700464222
1700464223 super(Handler.SON_LEVEL_REQUEST);
1700464224
1700464225 }
1700464226
1700464227 //儿子的答复
1700464228
1700464229 protected void response(IWomen women){
1700464230
1700464231 System.out.println(”––—母亲向儿子请示––-“);
1700464232
1700464233 System.out.println(women.getRequest());
1700464234
1700464235 System.out.println(“儿子的答复是:同意\n”);
1700464236
1700464237 }
1700464238
1700464239 }
1700464240
[ 上一页 ]  [ :1.700464191e+09 ]  [ 下一页 ]