Design pattern course - Factory Pattern basic implementation