This is in regards to Factory Method.
The PDF states (page 16)
"So, when do you know the Factory Method is at work? The rules are:
- the method creates a new object
- the method returns an abstract class or interface
- the abstract class or interface is implemented by several classes "
So, it seems that for a method that creates a class, for it to be a Factory Method, it should return an abstract class or interface, right? Seems clear, but I'm kinda wondering the difference between Factory Method and Abstract Factory. Fortunately this is answered on page 17:
"This is exactly where Abstract Factory and Factory Method differ: Abstract Factory methods are virtual or abstract and return abstract classes or interfaces. Factory Methods are abstract and return class types. "
It seems this conflicts with the statement that "Factory Methods return abstract classes or interface" when it this says "Factory Methods are abstract and return class types".
Anybody have an explanation?