Add code to setgolf().
Implemented remaining functions for exercise 1.