Deloitte Interview Question

Asked to write code on one scenario based on trigger