Here is a more complete example of factory method.
Factory method:
The yellow indicated the client dealing with the A version of classes.