Solve the all parts of given problem:
Problem: A diesel engine performs an amount of mechanical work equal to 2300J and discards an amount of heat equal to 4700J each cycle.
Part A: How much heat must be supplied to the engine in each cycle?
Part B: What is the thermal efficiency of the engine?
Please help for the above question, completely confused!! Show each steps if possible, Thanks.