A certain heat exchanger that follows a compressor receives 0.1 kg/s air at 1000 kPa, 500 K and cools it in a constant-pressure process to 320 K. The heat from the air is rejected to the ambient at 300 K. Find the rate of heat transfer and the total rate of entropy generation using (a) variable specific heats and (b) constant specific heats