抽象工厂模式
2021-03-18 17:45:50 22 举报
抽象工厂模式
作者其他创作
大纲/内容
NikePants
+ display():void
AdidasPants
return new NikeShoes();return new NikeClothes();return new NikePants();
Clothes
Shoes
AdidasFactory
+getShoes():Shoes+getClothes():Clothes+getPants():Pants
实现
NikeFactory
AdidasClothes
NikeClothes
Factory
return new AdidasShoes();return new AdidasClothes();return new AdidasPants();
Pants
AdidasShoes
NikeShoes
收藏
收藏
0 条评论
下一页