打字猴:1.700458016e+09
1700458016 代码清单9-8 生产女性八卦炉
1700458017
1700458018 public class FemaleFactory implements HumanFactory{
1700458019
1700458020 //生产出黑人女性
1700458021
1700458022 public Human createBlackHuman(){
1700458023
1700458024 return new FemaleBlackHuman();
1700458025
1700458026 }
1700458027
1700458028 //生产出白人女性
1700458029
1700458030 public Human createWhiteHuman(){
1700458031
1700458032 return new FemaleWhiteHuman();
1700458033
1700458034 }
1700458035
1700458036 //生产出黄人女性
1700458037
1700458038 public Human createYellowHuman(){
1700458039
1700458040 return new FemaleYellowHuman();
1700458041
1700458042 }
1700458043
1700458044 }
1700458045
1700458046 代码清单9-9 生产男性八卦炉
1700458047
1700458048 public class MaleFactory implements HumanFactory{
1700458049
1700458050 //生产出黑人男性
1700458051
1700458052 public Human createBlackHuman(){
1700458053
1700458054 return new MaleBlackHuman();
1700458055
1700458056 }
1700458057
1700458058 //生产出白人男性
1700458059
1700458060 public Human createWhiteHuman(){
1700458061
1700458062 return new MaleWhiteHuman();
1700458063
1700458064 }
1700458065
[ 上一页 ]  [ :1.700458016e+09 ]  [ 下一页 ]