Contained getClassNumbers into a function

getClassNumbers prints all available class numbers for a given
department