Learn design pattern SimpleFactory