headfirst: using function pointer array and enums