Hm, the trouble is that the professor doesn't seem to hold such a position as the queen or captain can.
There can be many professors representing a university; there can only be one captain in a team and one queen in a kingdom.
With due respect, if the professor is not the only one teaching in Computer Science, we may use the indefinite article "a" instead.
(Not a teacher.)