On this particular case, both heat and work are applied to the system, so both signs are positive.
We define Q as the heat, and W as the work, such that, by the first law of thermodynamics, we know that:
change in energy = Q + W.
In this case, we have a cup of water which is placed in a microwave oven, so this is a reservoir that gives heat to our system. Then Q is positive (because the heat is being applied to the system).
On the work side. If we do work on the system, the sign is positive. If the work is done by the system, the sign is negative
In this case, the work is applied to the system (as it rotates on the plate), thus the sign of the work is positive.
If you want to learn more about thermodynamics, you can read:
https://brainly.com/question/9614649