A device that converts mechanical energy into electrical energy is called:

(A) Motor
(B) Transformer
(C) Coil
(D) Generator

Answer: (D) Generator