1、2018年10月13日星期六,Neusoft Computer Science and Technology Department copy right,1,OO System Analysis & Design,【09_Factory Pattern】,2018年10月13日星期六,Neusoft Computer Science and Technology Department copy right,2,Enjoy pizza,2018年10月13日星期六,Neusoft Computer Science and Technology Department copy right,3,Ou
2、r job is:,To design a pizza Store, which could create a pizza object.,2018年10月13日星期六,Neusoft Computer Science and Technology Department copy right,4,Version 1: simple factory,2018年10月13日星期六,Neusoft Computer Science and Technology Department copy right,5,How to offer different styles?,Chicago style,N
3、ew York style,2018年10月13日星期六,Neusoft Computer Science and Technology Department copy right,6,Version 2: factory method,2018年10月13日星期六,Neusoft Computer Science and Technology Department copy right,7,The Factory Method Pattern,The Factory Method Pattern defines an interface for creating an object, but
4、 lets subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.,2018年10月13日星期六,Neusoft Computer Science and Technology Department copy right,8,Class diagram: Factory Method,2018年10月13日星期六,Neusoft Computer Science and Technology Department copy right,9,Class is over,Congratulations!,