Sample implementation with Simple Factory, and Abstract Factory