A cylinder fitted with a piston has a volume of 0.1 m^3 and contains 0.5 kg of saturated (liquid and vapor) steam at 0.4 MPa. Heat is transferred to the steam until the temperature is 300C, while the pressure remains constant. Determine the heat transfer and the work for this process.