Create courseFactory.php