A male with a hat and glasses is standing around.
The teacher is wearing a hat while teaching his class.
A male with a hat and glasses does not imply a teacher and standing around also does not indicate he is teaching his class.
(-x)
(-x)