Example of abstract factory pattern.