This is a question that refers to philosophical utilitarianism.
It is the search for the maximum happiness and pleasure, with the least possible suffering, but with an implicit moral question. When we are led to the feeling of pain or pleasure, we determine the way forward and know what is right or wrong.
In this way, it is possible that we are facing a moral dilemma. In our quest for happiness or minimizing our pain, our actions can impact others. That is, utilitarianism is essentially a teleological and consequentialist theory. Therefore, we must seek the impartial maximization of the happiness of all affected by our attitudes, regardless of the affective ties.
<span>The student is experiencing transference. Transference is in theory a phenomenon where a person unconsciously redirects the feelings they have about a person to feelings they have about another person. For example, the student could potentially hate his father because his father is abusive toward him and the professor my look or sound or have something to remind the student of his father, thereby causing the student's transference phenomena.</span>