Exclusive OR function called 'preferredName'

alot of this logic can be significantly reduced. try looking at other students answers for a hint on how to simplify.