工厂模式类图
2019-08-08 17:54:21 0 举报
工厂模式类图
作者其他创作
大纲/内容
I : IDress
m: dress() String
C : ChinesePeopleEat
m: eat() String
C: AbstractFactoryTest
m: main(String[] args) void
1、简单工厂模式
C : ChinesePeople
C : AmaricalPeopleEat
m: eat() String
《create》
C : ChinesePeopleDress
m: dress() String
C : AmaricalPeopleDress
m: dress() String
C : AmaricalPeopleFactory
m: createEat() IEatm: createDress() IDress
C : AmaricalPeopleFactory
m: create() IPeople
C : ChinesePeopleFactory
I : IEat
m: eat() String
I : IPeopleFactory
m: createEat() IEatm: createDress() IDress
I : IPeopleFactory
3、抽象工厂方法模式
2、工厂方法模式
C : ChinesePeopleFactory
C: SimpleFactoryTest
C : AmaricalPeople
I : IPeople
C: FactoryMethodTest
C: PeopleFactory
m: create(Class<? extends IPeople> clazz) IPeople
收藏
收藏
0 条评论
下一页