Diodes can be used as rectifiers while transistors can be used as amplifiers,oscillators and a switch.