Dear Student,
Painting the metal surface prevent the surface from corrosion by adding one more layer over the metal surface, And in electroplating two electrodes are inserted in the electrolytic solution called electrolyte and the two electrodes are attached to the two different terminals of the battery. Thus the electrode at which oxidation occurs is known as Anode and the electrode at which reduction occurs is called the cathode. It is industrially used for anti-corrosive coating on metals to prevent corrosion. Electroplating the surface creates a much stronger bond over the surface of materials for a long time comparing to the case of painting the surface. Electroplating the surface also gives a shiny appearance to the metal.
Regards