Electrical engineering involves analysis , design of devices
which are constructed from conductors Like Transformers, Electric motor etc. That
is why we called electric motor.
Electronics engineering involves analysis and design of
devices that are constructed form semiconductors like Op-amp, Diodes,
Transistors etc. Since computers, printers etc. are made from these devices, we
call them as electronic computers, electronic printers.
The above answer is correct but doesn't reflect the heart of the answer, It appears that it is just the choice of material that we use. The real difference between Electrical and electronics is not just in the Material used but is due to the difference in properties of different types of materials.
Electrical is all about Generation (V), Transmission (I),
Utilization (R), Measurement (V=IR & P=VI) and Manual Control (Switch
/Regulator) whether Electronics is all about automatic control according to y =
f(x). To implement the automatic
control, in the primary days Vacuum Tubes were used, after that Transistors
were used. Now a days ICs are used in Electronics.
The relation between X (X1, X2, X3) and Y(Y1, Y2) is called Electronics. You could use various components between X and Y but all the components must be controlling electrons by electrons. If you involve magnetic components, then this system is called Electro-magnetics. If you involve mechanical components it is called electro-mechanical. The input X is electrical input and the output Y is electrical output. If the input X and the output Y varies from 0V - nV continuously then this electronics is called Analog Electronics. If the input X and the output Y varies at some discrete steps then this electronics is called Digital Electronics.
So Electronics is all about controlling Electrons.