Therefore, both work and heat can increase the temperature of an object.
(1) If it is spontaneous and difference in temperature is involved, the raise in temperature is due to heat.
(2) If work is exchanged between an object (or system) and surroundings (or other object) by the overall displacement of the object, the raise in temperature is due to work.
Pingback:Theory of Thermodynamics – msa