why does the direction of teh coil has to be changed after each half rotation?
Direction of current in a coil of an AC generator reverses after each half rotation because after each half way rotation the direction of the motion of the coil reverses. This makes the terminal alternately positive and negative.
But in a DC generator the direction of the current has to be reversed to maintain same polarity which lets positive terminal remain positive and negative terminal negative.