A gas in a cylinder fitted with a piston undergoes a cycle composed of three processes. First, the gas expands at constant pressure with a heat addition of 40kJ and a work output of 10kJ. Then it is cooled at constant volume by a removal of 50kJ of heat. Finally, an adiabatic process restores the gas to it initial state. Determine a) the work of the adiabatic process and b) the stored energy of the gas at each of the other two states if its stored energy in the initial state is assigned the value of zero.